home *** CD-ROM | disk | FTP | other *** search
/ Games of Daze / Infomagic - Games of Daze (Summer 1995) (Disc 1 of 2).iso / djgpp / include / x11 / xlib.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-08-11  |  120.3 KB  |  4,335 lines

  1. /* $XConsortium: Xlib.h,v 11.215 91/07/22 15:42:38 rws Exp $ */
  2. /*
  3.  * Copyright 1985, 1986, 1987, 1991 by the Massachusetts Institute of Technology
  4.  *
  5.  * Permission to use, copy, modify, and distribute this software and its
  6.  * documentation for any purpose and without fee is hereby granted, provided
  7.  * that the above copyright notice appear in all copies and that both that
  8.  * copyright notice and this permission notice appear in supporting
  9.  * documentation, and that the name of M.I.T. not be used in advertising
  10.  * or publicity pertaining to distribution of the software without specific,
  11.  * written prior permission. M.I.T. makes no representations about the
  12.  * suitability of this software for any purpose.  It is provided "as is"
  13.  * without express or implied warranty.
  14.  *
  15.  * X Window System is a Trademark of MIT.
  16.  *
  17.  */
  18.  
  19.  
  20. /*
  21.  *      Xlib.h - Header definition and support file for the C subroutine
  22.  *      interface library (Xlib) to the X Window System Protocol (V11).
  23.  *      Structures and symbols starting with "_" are private to the library.
  24.  */
  25. #ifndef _XLIB_H_
  26. #define _XLIB_H_
  27.  
  28. #define XlibSpecificationRelease 5
  29.  
  30. #if defined(__HIGHC__) || defined(__WATCOMC__)
  31. typedef char * caddr_t;
  32. #endif
  33.  
  34. #ifdef USG
  35. #ifndef __TYPES__
  36. #include <sys/types.h>                  /* forgot to protect it... */
  37. #define __TYPES__
  38. #endif /* __TYPES__ */
  39. #else
  40. #if defined(_POSIX_SOURCE) && defined(MOTOROLA)
  41. #undef _POSIX_SOURCE
  42. #include <sys/types.h>
  43. #define _POSIX_SOURCE
  44. #else
  45. #include <sys/types.h>
  46. #endif
  47. #endif /* USG */
  48.  
  49. #include <X11/X.h>
  50.  
  51. /* applications should not depend on these two headers being included! */
  52. #include <X11/Xfuncproto.h>
  53. #include <X11/Xosdefs.h>
  54.  
  55. #ifndef X_WCHAR
  56. #ifdef X_NOT_STDC_ENV
  57. #define X_WCHAR
  58. #endif
  59. #endif
  60.  
  61. #ifndef X_WCHAR
  62. #include <stddef.h>
  63. #else
  64. /* replace this with #include or typedef appropriate for your system */
  65.  
  66. #ifndef MSDOS
  67. typedef unsigned long wchar_t;
  68. #endif
  69.  
  70. #endif
  71.  
  72. typedef char *XPointer;
  73.  
  74. #define Bool int
  75. #define Status int
  76. #define True 1
  77. #define False 0
  78.  
  79. #define QueuedAlready 0
  80. #define QueuedAfterReading 1
  81. #define QueuedAfterFlush 2
  82.  
  83. #define ConnectionNumber(dpy)   ((dpy)->fd)
  84. #define RootWindow(dpy, scr)    (((dpy)->screens[(scr)]).root)
  85. #define DefaultScreen(dpy)      ((dpy)->default_screen)
  86. #define DefaultRootWindow(dpy)  (((dpy)->screens[(dpy)->default_screen]).root)
  87. #define DefaultVisual(dpy, scr) (((dpy)->screens[(scr)]).root_visual)
  88. #define DefaultGC(dpy, scr)     (((dpy)->screens[(scr)]).default_gc)
  89. #define BlackPixel(dpy, scr)    (((dpy)->screens[(scr)]).black_pixel)
  90. #define WhitePixel(dpy, scr)    (((dpy)->screens[(scr)]).white_pixel)
  91. #define AllPlanes               ((unsigned long)~0L)
  92. #define QLength(dpy)            ((dpy)->qlen)
  93. #define DisplayWidth(dpy, scr)  (((dpy)->screens[(scr)]).width)
  94. #define DisplayHeight(dpy, scr) (((dpy)->screens[(scr)]).height)
  95. #define DisplayWidthMM(dpy, scr)(((dpy)->screens[(scr)]).mwidth)
  96. #define DisplayHeightMM(dpy, scr)(((dpy)->screens[(scr)]).mheight)
  97. #define DisplayPlanes(dpy, scr) (((dpy)->screens[(scr)]).root_depth)
  98. #define DisplayCells(dpy, scr)  (DefaultVisual((dpy), (scr))->map_entries)
  99. #define ScreenCount(dpy)        ((dpy)->nscreens)
  100. #define ServerVendor(dpy)       ((dpy)->vendor)
  101. #define ProtocolVersion(dpy)    ((dpy)->proto_major_version)
  102. #define ProtocolRevision(dpy)   ((dpy)->proto_minor_version)
  103. #define VendorRelease(dpy)      ((dpy)->release)
  104. #define DisplayString(dpy)      ((dpy)->display_name)
  105. #define DefaultDepth(dpy, scr)  (((dpy)->screens[(scr)]).root_depth)
  106. #define DefaultColormap(dpy, scr)(((dpy)->screens[(scr)]).cmap)
  107. #define BitmapUnit(dpy)         ((dpy)->bitmap_unit)
  108. #define BitmapBitOrder(dpy)     ((dpy)->bitmap_bit_order)
  109. #define BitmapPad(dpy)          ((dpy)->bitmap_pad)
  110. #define ImageByteOrder(dpy)     ((dpy)->byte_order)
  111. #define NextRequest(dpy)        ((dpy)->request + 1)
  112. #define LastKnownRequestProcessed(dpy)  ((dpy)->last_request_read)
  113.  
  114. /* macros for screen oriented applications (toolkit) */
  115. #define ScreenOfDisplay(dpy, scr)(&((dpy)->screens[(scr)]))
  116. #define DefaultScreenOfDisplay(dpy) (&((dpy)->screens[(dpy)->default_screen]))
  117. #define DisplayOfScreen(s)      ((s)->display)
  118. #define RootWindowOfScreen(s)   ((s)->root)
  119. #define BlackPixelOfScreen(s)   ((s)->black_pixel)
  120. #define WhitePixelOfScreen(s)   ((s)->white_pixel)
  121. #define DefaultColormapOfScreen(s)((s)->cmap)
  122. #define DefaultDepthOfScreen(s) ((s)->root_depth)
  123. #define DefaultGCOfScreen(s)    ((s)->default_gc)
  124. #define DefaultVisualOfScreen(s)((s)->root_visual)
  125. #define WidthOfScreen(s)        ((s)->width)
  126. #define HeightOfScreen(s)       ((s)->height)
  127. #define WidthMMOfScreen(s)      ((s)->mwidth)
  128. #define HeightMMOfScreen(s)     ((s)->mheight)
  129. #define PlanesOfScreen(s)       ((s)->root_depth)
  130. #define CellsOfScreen(s)        (DefaultVisualOfScreen((s))->map_entries)
  131. #define MinCmapsOfScreen(s)     ((s)->min_maps)
  132. #define MaxCmapsOfScreen(s)     ((s)->max_maps)
  133. #define DoesSaveUnders(s)       ((s)->save_unders)
  134. #define DoesBackingStore(s)     ((s)->backing_store)
  135. #define EventMaskOfScreen(s)    ((s)->root_input_mask)
  136.  
  137. /*
  138.  * Extensions need a way to hang private data on some structures.
  139.  */
  140. typedef struct _XExtData {
  141.     int number;             /* number returned by XRegisterExtension */
  142.     struct _XExtData *next; /* next item on list of data for structure */
  143.     int (*free_private)();  /* called to free private storage */
  144.     XPointer private_data;  /* data private to this extension. */
  145. } XExtData;
  146.  
  147. /*
  148.  * This file contains structures used by the extension mechanism.
  149.  */
  150. typedef struct {                /* public to extension, cannot be changed */
  151.     int extension;          /* extension number */
  152.     int major_opcode;       /* major op-code assigned by server */
  153.     int first_event;        /* first event number for the extension */
  154.     int first_error;        /* first error number for the extension */
  155. } XExtCodes;
  156.  
  157. /*
  158.  * Data structure for retrieving info about pixmap formats.
  159.  */
  160.  
  161. typedef struct {
  162.     int depth;
  163.     int bits_per_pixel;
  164.     int scanline_pad;
  165. } XPixmapFormatValues;
  166.  
  167.  
  168. /*
  169.  * Data structure for setting graphics context.
  170.  */
  171. typedef struct {
  172.     int function;           /* logical operation */
  173.     unsigned long plane_mask;/* plane mask */
  174.     unsigned long foreground;/* foreground pixel */
  175.     unsigned long background;/* background pixel */
  176.     int line_width;         /* line width */
  177.     int line_style;         /* LineSolid, LineOnOffDash, LineDoubleDash */
  178.     int cap_style;          /* CapNotLast, CapButt, 
  179.                    CapRound, CapProjecting */
  180.     int join_style;         /* JoinMiter, JoinRound, JoinBevel */
  181.     int fill_style;         /* FillSolid, FillTiled, 
  182.                    FillStippled, FillOpaeueStippled */
  183.     int fill_rule;          /* EvenOddRule, WindingRule */
  184.     int arc_mode;           /* ArcChord, ArcPieSlice */
  185.     Pixmap tile;            /* tile pixmap for tiling operations */
  186.     Pixmap stipple;         /* stipple 1 plane pixmap for stipping */
  187.     int ts_x_origin;        /* offset for tile or stipple operations */
  188.     int ts_y_origin;
  189.     Font font;              /* default text font for text operations */
  190.     int subwindow_mode;     /* ClipByChildren, IncludeInferiors */
  191.     Bool graphics_exposures;/* boolean, should exposures be generated */
  192.     int clip_x_origin;      /* origin for clipping */
  193.     int clip_y_origin;
  194.     Pixmap clip_mask;       /* bitmap clipping; other calls for rects */
  195.     int dash_offset;        /* patterned/dashed line information */
  196.     char dashes;
  197. } XGCValues;
  198.  
  199. /*
  200.  * Graphics context.  The contents of this structure are implementation
  201.  * dependent.  A GC should be treated as opaque by application code.
  202.  */
  203.  
  204. typedef struct _XGC {
  205.     XExtData *ext_data; /* hook for extension to hang data */
  206.     GContext gid;       /* protocol ID for graphics context */
  207.     Bool rects;         /* boolean: TRUE if clipmask is list of rectangles */
  208.     Bool dashes;        /* boolean: TRUE if dash-list is really a list */
  209.     unsigned long dirty;/* cache dirty bits */
  210.     XGCValues values;   /* shadow structure of values */
  211. } *GC;
  212.  
  213.  
  214. /*
  215.  * Visual structure; contains information about colormapping possible.
  216.  */
  217. typedef struct {
  218.     XExtData *ext_data;     /* hook for extension to hang data */
  219.     VisualID visualid;      /* visual id of this visual */
  220. #if defined(__cplusplus) || defined(c_plusplus)
  221.     int c_class;            /* C++ class of screen (monochrome, etc.) */
  222. #else
  223.     int class;              /* class of screen (monochrome, etc.) */
  224. #endif
  225.     unsigned long red_mask, green_mask, blue_mask;  /* mask values */
  226.     int bits_per_rgb;       /* log base 2 of distinct color values */
  227.     int map_entries;        /* color map entries */
  228. } Visual;
  229.  
  230. /*
  231.  * Depth structure; contains information for each possible depth.
  232.  */     
  233. typedef struct {
  234.     int depth;              /* this depth (Z) of the depth */
  235.     int nvisuals;           /* number of Visual types at this depth */
  236.     Visual *visuals;        /* list of visuals possible at this depth */
  237. } Depth;
  238.  
  239. /*
  240.  * Information about the screen.  The contents of this structure are
  241.  * implementation dependent.  A Screen should be treated as opaque
  242.  * by application code.
  243.  */
  244. #if defined(MSDOS) && defined(__WATCOMC__)      /* NCC 5/30/94 */
  245. struct _XDisplay;       /* avoid "nested class undefined" error with C++ */
  246. #endif
  247. typedef struct {
  248.     XExtData *ext_data;     /* hook for extension to hang data */
  249.     struct _XDisplay *display;/* back pointer to display structure */
  250.     Window root;            /* Root window id. */
  251.     int width, height;      /* width and height of screen */
  252.     int mwidth, mheight;    /* width and height of  in millimeters */
  253.     int ndepths;            /* number of depths possible */
  254.     Depth *depths;          /* list of allowable depths on the screen */
  255.     int root_depth;         /* bits per pixel */
  256.     Visual *root_visual;    /* root visual */
  257.     GC default_gc;          /* GC for the root root visual */
  258.     Colormap cmap;          /* default color map */
  259.     unsigned long white_pixel;
  260.     unsigned long black_pixel;      /* White and Black pixel values */
  261.     int max_maps, min_maps; /* max and min color maps */
  262.     int backing_store;      /* Never, WhenMapped, Always */
  263.     Bool save_unders;       
  264.     long root_input_mask;   /* initial root input mask */
  265. } Screen;
  266.  
  267. /*
  268.  * Format structure; describes ZFormat data the screen will understand.
  269.  */
  270. typedef struct {
  271.     XExtData *ext_data;     /* hook for extension to hang data */
  272.     int depth;              /* depth of this image format */
  273.     int bits_per_pixel;     /* bits/pixel at this depth */
  274.     int scanline_pad;       /* scanline must padded to this multiple */
  275. } ScreenFormat;
  276.  
  277. /*
  278.  * Data structure for setting window attributes.
  279.  */
  280. typedef struct {
  281.     Pixmap background_pixmap;   /* background or None or ParentRelative */
  282.     unsigned long background_pixel;     /* background pixel */
  283.     Pixmap border_pixmap;       /* border of the window */
  284.     unsigned long border_pixel; /* border pixel value */
  285.     int bit_gravity;            /* one of bit gravity values */
  286.     int win_gravity;            /* one of the window gravity values */
  287.     int backing_store;          /* NotUseful, WhenMapped, Always */
  288.     unsigned long backing_planes;/* planes to be preseved if possible */
  289.     unsigned long backing_pixel;/* value to use in restoring planes */
  290.     Bool save_under;            /* should bits under be saved? (popups) */
  291.     long event_mask;            /* set of events that should be saved */
  292.     long do_not_propagate_mask; /* set of events that should not propagate */
  293.     Bool override_redirect;     /* boolean value for override-redirect */
  294.     Colormap colormap;          /* color map to be associated with window */
  295.     Cursor cursor;              /* cursor to be displayed (or None) */
  296. } XSetWindowAttributes;
  297.  
  298. typedef struct {
  299.     int x, y;                   /* location of window */
  300.     int width, height;          /* width and height of window */
  301.     int border_width;           /* border width of window */
  302.     int depth;                  /* depth of window */
  303.     Visual *visual;             /* the associated visual structure */
  304.     Window root;                /* root of screen containing window */
  305. #if defined(__cplusplus) || defined(c_plusplus)
  306.     int c_class;                /* C++ InputOutput, InputOnly*/
  307. #else
  308.     int class;                  /* InputOutput, InputOnly*/
  309. #endif
  310.     int bit_gravity;            /* one of bit gravity values */
  311.     int win_gravity;            /* one of the window gravity values */
  312.     int backing_store;          /* NotUseful, WhenMapped, Always */
  313.     unsigned long backing_planes;/* planes to be preserved if possible */
  314.     unsigned long backing_pixel;/* value to be used when restoring planes */
  315.     Bool save_under;            /* boolean, should bits under be saved? */
  316.     Colormap colormap;          /* color map to be associated with window */
  317.     Bool map_installed;         /* boolean, is color map currently installed*/
  318.     int map_state;              /* IsUnmapped, IsUnviewable, IsViewable */
  319.     long all_event_masks;       /* set of events all people have interest in*/
  320.     long your_event_mask;       /* my event mask */
  321.     long do_not_propagate_mask; /* set of events that should not propagate */
  322.     Bool override_redirect;     /* boolean value for override-redirect */
  323.     Screen *screen;             /* back pointer to correct screen */
  324. } XWindowAttributes;
  325.  
  326. /*
  327.  * Data structure for host setting; getting routines.
  328.  *
  329.  */
  330.  
  331. typedef struct {
  332.     int family;             /* for example FamilyInternet */
  333.     int length;             /* length of address, in bytes */
  334.     char *address;          /* pointer to where to find the bytes */
  335. } XHostAddress;
  336.  
  337. /*
  338.  * Data structure for "image" data, used by image manipulation routines.
  339.  */
  340. typedef struct _XImage {
  341.     int width, height;          /* size of image */
  342.     int xoffset;                /* number of pixels offset in X direction */
  343.     int format;                 /* XYBitmap, XYPixmap, ZPixmap */
  344.     char *data;                 /* pointer to image data */
  345.     int byte_order;             /* data byte order, LSBFirst, MSBFirst */
  346.     int bitmap_unit;            /* quant. of scanline 8, 16, 32 */
  347.     int bitmap_bit_order;       /* LSBFirst, MSBFirst */
  348.     int bitmap_pad;             /* 8, 16, 32 either XY or ZPixmap */
  349.     int depth;                  /* depth of image */
  350.     int bytes_per_line;         /* accelarator to next line */
  351.     int bits_per_pixel;         /* bits per pixel (ZPixmap) */
  352.     unsigned long red_mask;     /* bits in z arrangment */
  353.     unsigned long green_mask;
  354.     unsigned long blue_mask;
  355.     XPointer obdata;            /* hook for the object routines to hang on */
  356.     struct funcs {              /* image manipulation routines */
  357.     struct _XImage *(*create_image)();
  358. #if NeedFunctionPrototypes
  359.     int (*destroy_image)        (struct _XImage *);
  360.     unsigned long (*get_pixel)  (struct _XImage *, int, int);
  361.     int (*put_pixel)            (struct _XImage *, int, int, unsigned long);
  362.     struct _XImage *(*sub_image)(struct _XImage *, int, int, unsigned int, unsigned int);
  363.     int (*add_pixel)            (struct _XImage *, long);
  364. #else
  365.     int (*destroy_image)();
  366.     unsigned long (*get_pixel)();
  367.     int (*put_pixel)();
  368.     struct _XImage *(*sub_image)();
  369.     int (*add_pixel)();
  370. #endif
  371.     } f;
  372. } XImage;
  373.  
  374. /* 
  375.  * Data structure for XReconfigureWindow
  376.  */
  377. typedef struct {
  378.     int x, y;
  379.     int width, height;
  380.     int border_width;
  381.     Window sibling;
  382.     int stack_mode;
  383. } XWindowChanges;
  384.  
  385. /*
  386.  * Data structure used by color operations
  387.  */
  388. typedef struct {
  389.     unsigned long pixel;
  390.     unsigned short red, green, blue;
  391.     char flags;  /* do_red, do_green, do_blue */
  392.     char pad;
  393. } XColor;
  394.  
  395. /* 
  396.  * Data structures for graphics operations.  On most machines, these are
  397.  * congruent with the wire protocol structures, so reformatting the data
  398.  * can be avoided on these architectures.
  399.  */
  400. typedef struct {
  401.     short x1, y1, x2, y2;
  402. } XSegment;
  403.  
  404. typedef struct {
  405.     short x, y;
  406. } XPoint;
  407.     
  408. typedef struct {
  409.     short x, y;
  410.     unsigned short width, height;
  411. } XRectangle;
  412.     
  413. typedef struct {
  414.     short x, y;
  415.     unsigned short width, height;
  416.     short angle1, angle2;
  417. } XArc;
  418.  
  419.  
  420. /* Data structure for XChangeKeyboardControl */
  421.  
  422. typedef struct {
  423.     int key_click_percent;
  424.     int bell_percent;
  425.     int bell_pitch;
  426.     int bell_duration;
  427.     int led;
  428.     int led_mode;
  429.     int key;
  430.     int auto_repeat_mode;   /* On, Off, Default */
  431. } XKeyboardControl;
  432.  
  433. /* Data structure for XGetKeyboardControl */
  434.  
  435. typedef struct {
  436.     int key_click_percent;
  437.     int bell_percent;
  438.     unsigned int bell_pitch, bell_duration;
  439.     unsigned long led_mask;
  440.     int global_auto_repeat;
  441.     char auto_repeats[32];
  442. } XKeyboardState;
  443.  
  444. /* Data structure for XGetMotionEvents.  */
  445.  
  446. typedef struct {
  447.     Time time;
  448.     short x, y;
  449. } XTimeCoord;
  450.  
  451. /* Data structure for X{Set,Get}ModifierMapping */
  452.  
  453. typedef struct {
  454.     int max_keypermod;      /* The server's max # of keys per modifier */
  455.     KeyCode *modifiermap;   /* An 8 by max_keypermod array of modifiers */
  456. } XModifierKeymap;
  457.  
  458. /*
  459.  * Display datatype maintaining display specific data.
  460.  * The contents of this structure are implementation dependent.
  461.  * A Display should be treated as opaque by application code.
  462.  */
  463. #if defined(MSDOS) && defined(__WATCOMC__)      /* NCC 5/30/94 */
  464. /* 
  465.  * Forward declarations of structs used in definition of Display
  466.  * to avoid "nested class undefined" errors with Watcom C++.
  467.  */
  468. struct _XIMFilter;
  469. struct _XContextDB;
  470. struct _XDisplayAtoms;
  471. struct _XKeytrans;
  472. struct _XExten;
  473. struct _XrmHashBucketRec;
  474. struct _XSQEvent;
  475. struct _XFreeFuncs;
  476. #endif
  477. typedef struct _XDisplay {
  478.     XExtData *ext_data;     /* hook for extension to hang data */
  479.     struct _XFreeFuncs *free_funcs; /* internal free functions */
  480.     int fd;                 /* Network socket. */
  481.     int lock;               /* is someone in critical section? */
  482.     int proto_major_version;/* maj. version of server's X protocol */
  483.     int proto_minor_version;/* minor version of servers X protocol */
  484.     char *vendor;           /* vendor of the server hardware */
  485.     XID resource_base;      /* resource ID base */
  486.     XID resource_mask;      /* resource ID mask bits */
  487.     XID resource_id;        /* allocator current ID */
  488.     int resource_shift;     /* allocator shift to correct bits */
  489.     XID (*resource_alloc)(); /* allocator function */
  490.     int byte_order;         /* screen byte order, LSBFirst, MSBFirst */
  491.     int bitmap_unit;        /* padding and data requirements */
  492.     int bitmap_pad;         /* padding requirements on bitmaps */
  493.     int bitmap_bit_order;   /* LeastSignificant or MostSignificant */
  494.     int nformats;           /* number of pixmap formats in list */
  495.     ScreenFormat *pixmap_format;    /* pixmap format list */
  496.     int vnumber;            /* Xlib's X protocol version number. */
  497.     int release;            /* release of the server */
  498.     struct _XSQEvent *head, *tail;  /* Input event queue. */
  499.     int qlen;               /* Length of input event queue */
  500.     unsigned long last_request_read; /* seq number of last event read */
  501.     unsigned long request;  /* sequence number of last request. */
  502.     char *last_req;         /* beginning of last request, or dummy */
  503.     char *buffer;           /* Output buffer starting address. */
  504.     char *bufptr;           /* Output buffer index pointer. */
  505.     char *bufmax;           /* Output buffer maximum+1 address. */
  506.     unsigned max_request_size; /* maximum number 32 bit words in request*/
  507.     struct _XrmHashBucketRec *db;
  508.     int (*synchandler)();   /* Synchronization handler */
  509.     char *display_name;     /* "host:display" string used on this connect*/
  510.     int default_screen;     /* default screen for operations */
  511.     int nscreens;           /* number of screens on this server*/
  512.     Screen *screens;        /* pointer to list of screens */
  513.     unsigned long motion_buffer;    /* size of motion buffer */
  514.     Window current;         /* for use internally for Keymap notify */
  515.     int min_keycode;        /* minimum defined keycode */
  516.     int max_keycode;        /* maximum defined keycode */
  517.     KeySym *keysyms;        /* This server's keysyms */
  518.     XModifierKeymap *modifiermap;   /* This server's modifier keymap */
  519.     int keysyms_per_keycode;/* number of rows */
  520.     char *xdefaults;        /* contents of defaults from server */
  521.     char *scratch_buffer;   /* place to hang scratch buffer */
  522.     unsigned long scratch_length;   /* length of scratch buffer */
  523.     int ext_number;         /* extension number on this display */
  524.     struct _XExten *ext_procs; /* extensions initialized on this display */
  525.     /*
  526.      * the following can be fixed size, as the protocol defines how
  527.      * much address space is available. 
  528.      * While this could be done using the extension vector, there
  529.      * may be MANY events processed, so a search through the extension
  530.      * list to find the right procedure for each event might be
  531.      * expensive if many extensions are being used.
  532.      */
  533.     Bool (*event_vec[128])();  /* vector for wire to event */
  534.     Status (*wire_vec[128])(); /* vector for event to wire */
  535.     KeySym lock_meaning;       /* for XLookupString */
  536.     struct _XKeytrans *key_bindings; /* for XLookupString */
  537.     Font cursor_font;          /* for XCreateFontCursor */
  538.     struct _XDisplayAtoms *atoms; /* for XInternAtom */
  539.     struct {                   /* for XReconfigureWMWindow */
  540.         long sequence_number;
  541.         int (*old_handler)();
  542.         Bool succeeded;
  543.     } reconfigure_wm_window;
  544.     unsigned long flags;       /* internal connection flags */
  545.     unsigned int mode_switch;  /* keyboard group modifiers */
  546.     struct _XContextDB *context_db; /* context database */
  547.     Bool (**error_vec)();      /* vector for wire to error */
  548.     /*
  549.      * Xcms information
  550.      */
  551.     struct {
  552.        XPointer defaultCCCs;  /* pointer to an array of default XcmsCCC */
  553.        XPointer clientCmaps;  /* pointer to linked list of XcmsCmapRec */
  554.        XPointer perVisualIntensityMaps;
  555.                   /* linked list of XcmsIntensityMap */
  556.     } cms;
  557.     int conn_checker;         /* ugly thing used by _XEventsQueued */
  558.     struct _XIMFilter *im_filters;
  559. } Display;
  560.  
  561. #if NeedFunctionPrototypes      /* prototypes require event type definitions */
  562. #undef _XEVENT_
  563. #endif
  564. #ifndef _XEVENT_
  565. /*
  566.  * Definitions of specific events.
  567.  */
  568. typedef struct {
  569.     int type;               /* of event */
  570.     unsigned long serial;   /* # of last request processed by server */
  571.     Bool send_event;        /* true if this came from a SendEvent request */
  572.     Display *display;       /* Display the event was read from */
  573.     Window window;          /* "event" window it is reported relative to */
  574.     Window root;            /* root window that the event occured on */
  575.     Window subwindow;       /* child window */
  576.     Time time;              /* milliseconds */
  577.     int x, y;               /* pointer x, y coordinates in event window */
  578.     int x_root, y_root;     /* coordinates relative to root */
  579.     unsigned int state;     /* key or button mask */
  580.     unsigned int keycode;   /* detail */
  581.     Bool same_screen;       /* same screen flag */
  582. } XKeyEvent;
  583. typedef XKeyEvent XKeyPressedEvent;
  584. typedef XKeyEvent XKeyReleasedEvent;
  585.  
  586. typedef struct {
  587.     int type;               /* of event */
  588.     unsigned long serial;   /* # of last request processed by server */
  589.     Bool send_event;        /* true if this came from a SendEvent request */
  590.     Display *display;       /* Display the event was read from */
  591.     Window window;          /* "event" window it is reported relative to */
  592.     Window root;            /* root window that the event occured on */
  593.     Window subwindow;       /* child window */
  594.     Time time;              /* milliseconds */
  595.     int x, y;               /* pointer x, y coordinates in event window */
  596.     int x_root, y_root;     /* coordinates relative to root */
  597.     unsigned int state;     /* key or button mask */
  598.     unsigned int button;    /* detail */
  599.     Bool same_screen;       /* same screen flag */
  600. } XButtonEvent;
  601. typedef XButtonEvent XButtonPressedEvent;
  602. typedef XButtonEvent XButtonReleasedEvent;
  603.  
  604. typedef struct {
  605.     int type;               /* of event */
  606.     unsigned long serial;   /* # of last request processed by server */
  607.     Bool send_event;        /* true if this came from a SendEvent request */
  608.     Display *display;       /* Display the event was read from */
  609.     Window window;          /* "event" window reported relative to */
  610.     Window root;            /* root window that the event occured on */
  611.     Window subwindow;       /* child window */
  612.     Time time;              /* milliseconds */
  613.     int x, y;               /* pointer x, y coordinates in event window */
  614.     int x_root, y_root;     /* coordinates relative to root */
  615.     unsigned int state;     /* key or button mask */
  616.     char is_hint;           /* detail */
  617.     Bool same_screen;       /* same screen flag */
  618. } XMotionEvent;
  619. typedef XMotionEvent XPointerMovedEvent;
  620.  
  621. typedef struct {
  622.     int type;               /* of event */
  623.     unsigned long serial;   /* # of last request processed by server */
  624.     Bool send_event;        /* true if this came from a SendEvent request */
  625.     Display *display;       /* Display the event was read from */
  626.     Window window;          /* "event" window reported relative to */
  627.     Window root;            /* root window that the event occured on */
  628.     Window subwindow;       /* child window */
  629.     Time time;              /* milliseconds */
  630.     int x, y;               /* pointer x, y coordinates in event window */
  631.     int x_root, y_root;     /* coordinates relative to root */
  632.     int mode;               /* NotifyNormal, NotifyGrab, NotifyUngrab */
  633.     int detail;
  634.     /*
  635.      * NotifyAncestor, NotifyVirtual, NotifyInferior, 
  636.      * NotifyNonlinear,NotifyNonlinearVirtual
  637.      */
  638.     Bool same_screen;       /* same screen flag */
  639.     Bool focus;             /* boolean focus */
  640.     unsigned int state;     /* key or button mask */
  641. } XCrossingEvent;
  642. typedef XCrossingEvent XEnterWindowEvent;
  643. typedef XCrossingEvent XLeaveWindowEvent;
  644.  
  645. typedef struct {
  646.     int type;               /* FocusIn or FocusOut */
  647.     unsigned long serial;   /* # of last request processed by server */
  648.     Bool send_event;        /* true if this came from a SendEvent request */
  649.     Display *display;       /* Display the event was read from */
  650.     Window window;          /* window of event */
  651.     int mode;               /* NotifyNormal, NotifyGrab, NotifyUngrab */
  652.     int detail;
  653.     /*
  654.      * NotifyAncestor, NotifyVirtual, NotifyInferior, 
  655.      * NotifyNonlinear,NotifyNonlinearVirtual, NotifyPointer,
  656.      * NotifyPointerRoot, NotifyDetailNone 
  657.      */
  658. } XFocusChangeEvent;
  659. typedef XFocusChangeEvent XFocusInEvent;
  660. typedef XFocusChangeEvent XFocusOutEvent;
  661.  
  662. /* generated on EnterWindow and FocusIn  when KeyMapState selected */
  663. typedef struct {
  664.     int type;
  665.     unsigned long serial;   /* # of last request processed by server */
  666.     Bool send_event;        /* true if this came from a SendEvent request */
  667.     Display *display;       /* Display the event was read from */
  668.     Window window;
  669.     char key_vector[32];
  670. } XKeymapEvent; 
  671.  
  672. typedef struct {
  673.     int type;
  674.     unsigned long serial;   /* # of last request processed by server */
  675.     Bool send_event;        /* true if this came from a SendEvent request */
  676.     Display *display;       /* Display the event was read from */
  677.     Window window;
  678.     int x, y;
  679.     int width, height;
  680.     int count;              /* if non-zero, at least this many more */
  681. } XExposeEvent;
  682.  
  683. typedef struct {
  684.     int type;
  685.     unsigned long serial;   /* # of last request processed by server */
  686.     Bool send_event;        /* true if this came from a SendEvent request */
  687.     Display *display;       /* Display the event was read from */
  688.     Drawable drawable;
  689.     int x, y;
  690.     int width, height;
  691.     int count;              /* if non-zero, at least this many more */
  692.     int major_code;         /* core is CopyArea or CopyPlane */
  693.     int minor_code;         /* not defined in the core */
  694. } XGraphicsExposeEvent;
  695.  
  696. typedef struct {
  697.     int type;
  698.     unsigned long serial;   /* # of last request processed by server */
  699.     Bool send_event;        /* true if this came from a SendEvent request */
  700.     Display *display;       /* Display the event was read from */
  701.     Drawable drawable;
  702.     int major_code;         /* core is CopyArea or CopyPlane */
  703.     int minor_code;         /* not defined in the core */
  704. } XNoExposeEvent;
  705.  
  706. typedef struct {
  707.     int type;
  708.     unsigned long serial;   /* # of last request processed by server */
  709.     Bool send_event;        /* true if this came from a SendEvent request */
  710.     Display *display;       /* Display the event was read from */
  711.     Window window;
  712.     int state;              /* Visibility state */
  713. } XVisibilityEvent;
  714.  
  715. typedef struct {
  716.     int type;
  717.     unsigned long serial;   /* # of last request processed by server */
  718.     Bool send_event;        /* true if this came from a SendEvent request */
  719.     Display *display;       /* Display the event was read from */
  720.     Window parent;          /* parent of the window */
  721.     Window window;          /* window id of window created */
  722.     int x, y;               /* window location */
  723.     int width, height;      /* size of window */
  724.     int border_width;       /* border width */
  725.     Bool override_redirect; /* creation should be overridden */
  726. } XCreateWindowEvent;
  727.  
  728. typedef struct {
  729.     int type;
  730.     unsigned long serial;   /* # of last request processed by server */
  731.     Bool send_event;        /* true if this came from a SendEvent request */
  732.     Display *display;       /* Display the event was read from */
  733.     Window event;
  734.     Window window;
  735. } XDestroyWindowEvent;
  736.  
  737. typedef struct {
  738.     int type;
  739.     unsigned long serial;   /* # of last request processed by server */
  740.     Bool send_event;        /* true if this came from a SendEvent request */
  741.     Display *display;       /* Display the event was read from */
  742.     Window event;
  743.     Window window;
  744.     Bool from_configure;
  745. } XUnmapEvent;
  746.  
  747. typedef struct {
  748.     int type;
  749.     unsigned long serial;   /* # of last request processed by server */
  750.     Bool send_event;        /* true if this came from a SendEvent request */
  751.     Display *display;       /* Display the event was read from */
  752.     Window event;
  753.     Window window;
  754.     Bool override_redirect; /* boolean, is override set... */
  755. } XMapEvent;
  756.  
  757. typedef struct {
  758.     int type;
  759.     unsigned long serial;   /* # of last request processed by server */
  760.     Bool send_event;        /* true if this came from a SendEvent request */
  761.     Display *display;       /* Display the event was read from */
  762.     Window parent;
  763.     Window window;
  764. } XMapRequestEvent;
  765.  
  766. typedef struct {
  767.     int type;
  768.     unsigned long serial;   /* # of last request processed by server */
  769.     Bool send_event;        /* true if this came from a SendEvent request */
  770.     Display *display;       /* Display the event was read from */
  771.     Window event;
  772.     Window window;
  773.     Window parent;
  774.     int x, y;
  775.     Bool override_redirect;
  776. } XReparentEvent;
  777.  
  778. typedef struct {
  779.     int type;
  780.     unsigned long serial;   /* # of last request processed by server */
  781.     Bool send_event;        /* true if this came from a SendEvent request */
  782.     Display *display;       /* Display the event was read from */
  783.     Window event;
  784.     Window window;
  785.     int x, y;
  786.     int width, height;
  787.     int border_width;
  788.     Window above;
  789.     Bool override_redirect;
  790. } XConfigureEvent;
  791.  
  792. typedef struct {
  793.     int type;
  794.     unsigned long serial;   /* # of last request processed by server */
  795.     Bool send_event;        /* true if this came from a SendEvent request */
  796.     Display *display;       /* Display the event was read from */
  797.     Window event;
  798.     Window window;
  799.     int x, y;
  800. } XGravityEvent;
  801.  
  802. typedef struct {
  803.     int type;
  804.     unsigned long serial;   /* # of last request processed by server */
  805.     Bool send_event;        /* true if this came from a SendEvent request */
  806.     Display *display;       /* Display the event was read from */
  807.     Window window;
  808.     int width, height;
  809. } XResizeRequestEvent;
  810.  
  811. typedef struct {
  812.     int type;
  813.     unsigned long serial;   /* # of last request processed by server */
  814.     Bool send_event;        /* true if this came from a SendEvent request */
  815.     Display *display;       /* Display the event was read from */
  816.     Window parent;
  817.     Window window;
  818.     int x, y;
  819.     int width, height;
  820.     int border_width;
  821.     Window above;
  822.     int detail;             /* Above, Below, TopIf, BottomIf, Opposite */
  823.     unsigned long value_mask;
  824. } XConfigureRequestEvent;
  825.  
  826. typedef struct {
  827.     int type;
  828.     unsigned long serial;   /* # of last request processed by server */
  829.     Bool send_event;        /* true if this came from a SendEvent request */
  830.     Display *display;       /* Display the event was read from */
  831.     Window event;
  832.     Window window;
  833.     int place;              /* PlaceOnTop, PlaceOnBottom */
  834. } XCirculateEvent;
  835.  
  836. typedef struct {
  837.     int type;
  838.     unsigned long serial;   /* # of last request processed by server */
  839.     Bool send_event;        /* true if this came from a SendEvent request */
  840.     Display *display;       /* Display the event was read from */
  841.     Window parent;
  842.     Window window;
  843.     int place;              /* PlaceOnTop, PlaceOnBottom */
  844. } XCirculateRequestEvent;
  845.  
  846. typedef struct {
  847.     int type;
  848.     unsigned long serial;   /* # of last request processed by server */
  849.     Bool send_event;        /* true if this came from a SendEvent request */
  850.     Display *display;       /* Display the event was read from */
  851.     Window window;
  852.     Atom atom;
  853.     Time time;
  854.     int state;              /* NewValue, Deleted */
  855. } XPropertyEvent;
  856.  
  857. typedef struct {
  858.     int type;
  859.     unsigned long serial;   /* # of last request processed by server */
  860.     Bool send_event;        /* true if this came from a SendEvent request */
  861.     Display *display;       /* Display the event was read from */
  862.     Window window;
  863.     Atom selection;
  864.     Time time;
  865. } XSelectionClearEvent;
  866.  
  867. typedef struct {
  868.     int type;
  869.     unsigned long serial;   /* # of last request processed by server */
  870.     Bool send_event;        /* true if this came from a SendEvent request */
  871.     Display *display;       /* Display the event was read from */
  872.     Window owner;
  873.     Window requestor;
  874.     Atom selection;
  875.     Atom target;
  876.     Atom property;
  877.     Time time;
  878. } XSelectionRequestEvent;
  879.  
  880. typedef struct {
  881.     int type;
  882.     unsigned long serial;   /* # of last request processed by server */
  883.     Bool send_event;        /* true if this came from a SendEvent request */
  884.     Display *display;       /* Display the event was read from */
  885.     Window requestor;
  886.     Atom selection;
  887.     Atom target;
  888.     Atom property;          /* ATOM or None */
  889.     Time time;
  890. } XSelectionEvent;
  891.  
  892. typedef struct {
  893.     int type;
  894.     unsigned long serial;   /* # of last request processed by server */
  895.     Bool send_event;        /* true if this came from a SendEvent request */
  896.     Display *display;       /* Display the event was read from */
  897.     Window window;
  898.     Colormap colormap;      /* COLORMAP or None */
  899. #if defined(__cplusplus) || defined(c_plusplus)
  900.     Bool c_new;             /* C++ */
  901. #else
  902.     Bool new;
  903. #endif
  904.     int state;              /* ColormapInstalled, ColormapUninstalled */
  905. } XColormapEvent;
  906.  
  907. typedef struct {
  908.     int type;
  909.     unsigned long serial;   /* # of last request processed by server */
  910.     Bool send_event;        /* true if this came from a SendEvent request */
  911.     Display *display;       /* Display the event was read from */
  912.     Window window;
  913.     Atom message_type;
  914.     int format;
  915.     union {
  916.         char b[20];
  917.         short s[10];
  918.         long l[5];
  919.         } data;
  920. } XClientMessageEvent;
  921.  
  922. typedef struct {
  923.     int type;
  924.     unsigned long serial;   /* # of last request processed by server */
  925.     Bool send_event;        /* true if this came from a SendEvent request */
  926.     Display *display;       /* Display the event was read from */
  927.     Window window;          /* unused */
  928.     int request;            /* one of MappingModifier, MappingKeyboard,
  929.                    MappingPointer */
  930.     int first_keycode;      /* first keycode */
  931.     int count;              /* defines range of change w. first_keycode*/
  932. } XMappingEvent;
  933.  
  934. typedef struct {
  935.     int type;
  936.     Display *display;       /* Display the event was read from */
  937.     XID resourceid;         /* resource id */
  938.     unsigned long serial;   /* serial number of failed request */
  939.     unsigned char error_code;       /* error code of failed request */
  940.     unsigned char request_code;     /* Major op-code of failed request */
  941.     unsigned char minor_code;       /* Minor op-code of failed request */
  942. } XErrorEvent;
  943.  
  944. typedef struct {
  945.     int type;
  946.     unsigned long serial;   /* # of last request processed by server */
  947.     Bool send_event;        /* true if this came from a SendEvent request */
  948.     Display *display;/* Display the event was read from */
  949.     Window window;  /* window on which event was requested in event mask */
  950. } XAnyEvent;
  951.  
  952. /*
  953.  * this union is defined so Xlib can always use the same sized
  954.  * event structure internally, to avoid memory fragmentation.
  955.  */
  956. typedef union _XEvent {
  957.     int type;               /* must not be changed; first element */
  958.     XAnyEvent xany;
  959.     XKeyEvent xkey;
  960.     XButtonEvent xbutton;
  961.     XMotionEvent xmotion;
  962.     XCrossingEvent xcrossing;
  963.     XFocusChangeEvent xfocus;
  964.     XExposeEvent xexpose;
  965.     XGraphicsExposeEvent xgraphicsexpose;
  966.     XNoExposeEvent xnoexpose;
  967.     XVisibilityEvent xvisibility;
  968.     XCreateWindowEvent xcreatewindow;
  969.     XDestroyWindowEvent xdestroywindow;
  970.     XUnmapEvent xunmap;
  971.     XMapEvent xmap;
  972.     XMapRequestEvent xmaprequest;
  973.     XReparentEvent xreparent;
  974.     XConfigureEvent xconfigure;
  975.     XGravityEvent xgravity;
  976.     XResizeRequestEvent xresizerequest;
  977.     XConfigureRequestEvent xconfigurerequest;
  978.     XCirculateEvent xcirculate;
  979.     XCirculateRequestEvent xcirculaterequest;
  980.     XPropertyEvent xproperty;
  981.     XSelectionClearEvent xselectionclear;
  982.     XSelectionRequestEvent xselectionrequest;
  983.     XSelectionEvent xselection;
  984.     XColormapEvent xcolormap;
  985.     XClientMessageEvent xclient;
  986.     XMappingEvent xmapping;
  987.     XErrorEvent xerror;
  988.     XKeymapEvent xkeymap;
  989.     long pad[24];
  990. } XEvent;
  991. #endif
  992.  
  993. #define XAllocID(dpy) ((*(dpy)->resource_alloc)((dpy)))
  994.  
  995. /*
  996.  * per character font metric information.
  997.  */
  998. typedef struct {
  999.     short       lbearing;       /* origin to left edge of raster */
  1000.     short       rbearing;       /* origin to right edge of raster */
  1001.     short       width;          /* advance to next char's origin */
  1002.     short       ascent;         /* baseline to top edge of raster */
  1003.     short       descent;        /* baseline to bottom edge of raster */
  1004.     unsigned short attributes;  /* per char flags (not predefined) */
  1005. } XCharStruct;
  1006.  
  1007. /*
  1008.  * To allow arbitrary information with fonts, there are additional properties
  1009.  * returned.
  1010.  */
  1011. typedef struct {
  1012.     Atom name;
  1013.     unsigned long card32;
  1014. } XFontProp;
  1015.  
  1016. typedef struct {
  1017.     XExtData    *ext_data;      /* hook for extension to hang data */
  1018.     Font        fid;            /* Font id for this font */
  1019.     unsigned    direction;      /* hint about direction the font is painted */
  1020.     unsigned    min_char_or_byte2;/* first character */
  1021.     unsigned    max_char_or_byte2;/* last character */
  1022.     unsigned    min_byte1;      /* first row that exists */
  1023.     unsigned    max_byte1;      /* last row that exists */
  1024.     Bool        all_chars_exist;/* flag if all characters have non-zero size*/
  1025.     unsigned    default_char;   /* char to print for undefined character */
  1026.     int         n_properties;   /* how many properties there are */
  1027.     XFontProp   *properties;    /* pointer to array of additional properties*/
  1028.     XCharStruct min_bounds;     /* minimum bounds over all existing char*/
  1029.     XCharStruct max_bounds;     /* maximum bounds over all existing char*/
  1030.     XCharStruct *per_char;      /* first_char to last_char information */
  1031.     int         ascent;         /* log. extent above baseline for spacing */
  1032.     int         descent;        /* log. descent below baseline for spacing */
  1033. } XFontStruct;
  1034.  
  1035. /*
  1036.  * PolyText routines take these as arguments.
  1037.  */
  1038. typedef struct {
  1039.     char *chars;                /* pointer to string */
  1040.     int nchars;                 /* number of characters */
  1041.     int delta;                  /* delta between strings */
  1042.     Font font;                  /* font to print it in, None don't change */
  1043. } XTextItem;
  1044.  
  1045. typedef struct {                /* normal 16 bit characters are two bytes */
  1046.     unsigned char byte1;
  1047.     unsigned char byte2;
  1048. } XChar2b;
  1049.  
  1050. typedef struct {
  1051.     XChar2b *chars;             /* two byte characters */
  1052.     int nchars;                 /* number of characters */
  1053.     int delta;                  /* delta between strings */
  1054.     Font font;                  /* font to print it in, None don't change */
  1055. } XTextItem16;
  1056.  
  1057.  
  1058. typedef union { Display *display;
  1059.         GC gc;
  1060.         Visual *visual;
  1061.         Screen *screen;
  1062.         ScreenFormat *pixmap_format;
  1063.         XFontStruct *font; } XEDataObject;
  1064.  
  1065. typedef struct {
  1066.     XRectangle      max_ink_extent;
  1067.     XRectangle      max_logical_extent;
  1068. } XFontSetExtents;
  1069.  
  1070. typedef struct _XFontSet *XFontSet;
  1071.  
  1072. typedef struct {
  1073.     char           *chars;
  1074.     int             nchars;
  1075.     int             delta;
  1076.     XFontSet        font_set;
  1077. } XmbTextItem;
  1078.  
  1079. typedef struct {
  1080.     wchar_t        *chars;
  1081.     int             nchars;
  1082.     int             delta;
  1083.     XFontSet        font_set;
  1084. } XwcTextItem;
  1085.  
  1086. typedef void (*XIMProc)();
  1087.  
  1088. typedef struct _XIM *XIM;
  1089. typedef struct _XIC *XIC;
  1090.  
  1091. typedef unsigned long XIMStyle;
  1092.  
  1093. typedef struct {
  1094.     unsigned short count_styles;
  1095.     XIMStyle *supported_styles;
  1096. } XIMStyles;
  1097.  
  1098. #define XIMPreeditArea          0x0001L
  1099. #define XIMPreeditCallbacks     0x0002L
  1100. #define XIMPreeditPosition      0x0004L
  1101. #define XIMPreeditNothing       0x0008L
  1102. #define XIMPreeditNone          0x0010L
  1103. #define XIMStatusArea           0x0100L
  1104. #define XIMStatusCallbacks      0x0200L
  1105. #define XIMStatusNothing        0x0400L
  1106. #define XIMStatusNone           0x0800L
  1107.  
  1108. #define XNVaNestedList "XNVaNestedList"
  1109. #define XNQueryInputStyle "queryInputStyle"
  1110. #define XNClientWindow "clientWindow"
  1111. #define XNInputStyle "inputStyle"
  1112. #define XNFocusWindow "focusWindow"
  1113. #define XNResourceName "resourceName"
  1114. #define XNResourceClass "resourceClass"
  1115. #define XNGeometryCallback "geometryCallback"
  1116. #define XNFilterEvents "filterEvents"
  1117. #define XNPreeditStartCallback "preeditStartCallback"
  1118. #define XNPreeditDoneCallback "preeditDoneCallback"
  1119. #define XNPreeditDrawCallback "preeditDrawCallback"
  1120. #define XNPreeditCaretCallback "preeditCaretCallback"
  1121. #define XNPreeditAttributes "preeditAttributes"
  1122. #define XNStatusStartCallback "statusStartCallback"
  1123. #define XNStatusDoneCallback "statusDoneCallback"
  1124. #define XNStatusDrawCallback "statusDrawCallback"
  1125. #define XNStatusAttributes "statusAttributes"
  1126. #define XNArea "area"
  1127. #define XNAreaNeeded "areaNeeded"
  1128. #define XNSpotLocation "spotLocation"
  1129. #define XNColormap "colorMap"
  1130. #define XNStdColormap "stdColorMap"
  1131. #define XNForeground "foreground"
  1132. #define XNBackground "background"
  1133. #define XNBackgroundPixmap "backgroundPixmap"
  1134. #define XNFontSet "fontSet"
  1135. #define XNLineSpace "lineSpace"
  1136. #define XNCursor "cursor"
  1137.  
  1138. #define XBufferOverflow         -1
  1139. #define XLookupNone             1
  1140. #define XLookupChars            2
  1141. #define XLookupKeySym           3
  1142. #define XLookupBoth             4
  1143.  
  1144. #if NeedFunctionPrototypes
  1145. typedef void *XVaNestedList;
  1146. #else
  1147. typedef XPointer XVaNestedList;
  1148. #endif
  1149.  
  1150. typedef struct {
  1151.     XPointer client_data;
  1152.     XIMProc callback;
  1153. } XIMCallback;
  1154.  
  1155. typedef unsigned long XIMFeedback;
  1156.  
  1157. #define XIMReverse      1
  1158. #define XIMUnderline    (1<<1) 
  1159. #define XIMHighlight    (1<<2)
  1160. #define XIMPrimary      (1<<5)
  1161. #define XIMSecondary    (1<<6)
  1162. #define XIMTertiary     (1<<7)
  1163.  
  1164. typedef struct _XIMText {
  1165.     unsigned short length;
  1166.     XIMFeedback *feedback;
  1167.     Bool encoding_is_wchar; 
  1168.     union {
  1169.     char *multi_byte;
  1170.     wchar_t *wide_char;
  1171.     } string; 
  1172. } XIMText;
  1173.  
  1174. typedef struct _XIMPreeditDrawCallbackStruct {
  1175.     int caret;          /* Cursor offset within pre-edit string */
  1176.     int chg_first;      /* Starting change position */
  1177.     int chg_length;     /* Length of the change in character count */
  1178.     XIMText *text;
  1179. } XIMPreeditDrawCallbackStruct;
  1180.  
  1181. typedef enum {
  1182.     XIMForwardChar, XIMBackwardChar,
  1183.     XIMForwardWord, XIMBackwardWord,
  1184.     XIMCaretUp, XIMCaretDown,
  1185.     XIMNextLine, XIMPreviousLine,
  1186.     XIMLineStart, XIMLineEnd, 
  1187.     XIMAbsolutePosition,
  1188.     XIMDontChange
  1189. } XIMCaretDirection;
  1190.  
  1191. typedef enum {
  1192.     XIMIsInvisible,     /* Disable caret feedback */ 
  1193.     XIMIsPrimary,       /* UI defined caret feedback */
  1194.     XIMIsSecondary      /* UI defined caret feedback */
  1195. } XIMCaretStyle;
  1196.  
  1197. typedef struct _XIMPreeditCaretCallbackStruct {
  1198.     int position;                /* Caret offset within pre-edit string */
  1199.     XIMCaretDirection direction; /* Caret moves direction */
  1200.     XIMCaretStyle style;         /* Feedback of the caret */
  1201. } XIMPreeditCaretCallbackStruct;
  1202.  
  1203. typedef enum {
  1204.     XIMTextType,
  1205.     XIMBitmapType
  1206. } XIMStatusDataType;
  1207.     
  1208. typedef struct _XIMStatusDrawCallbackStruct {
  1209.     XIMStatusDataType type;
  1210.     union {
  1211.     XIMText *text;
  1212.     Pixmap  bitmap;
  1213.     } data;
  1214. } XIMStatusDrawCallbackStruct;
  1215.  
  1216. _XFUNCPROTOBEGIN
  1217.  
  1218. extern XFontStruct *XLoadQueryFont(
  1219. #if NeedFunctionPrototypes
  1220.     Display*            /* display */,
  1221.     _Xconst char*       /* name */
  1222. #endif
  1223. );
  1224.  
  1225. extern XFontStruct *XQueryFont(
  1226. #if NeedFunctionPrototypes
  1227.     Display*            /* display */,
  1228.     XID                 /* font_ID */
  1229. #endif
  1230. );
  1231.  
  1232.  
  1233. extern XTimeCoord *XGetMotionEvents(
  1234. #if NeedFunctionPrototypes
  1235.     Display*            /* display */,
  1236.     Window              /* w */,
  1237.     Time                /* start */,
  1238.     Time                /* stop */,
  1239.     int*                /* nevents_return */
  1240. #endif
  1241. );
  1242.  
  1243. extern XModifierKeymap *XDeleteModifiermapEntry(
  1244. #if NeedFunctionPrototypes
  1245.     XModifierKeymap*    /* modmap */,
  1246. #if NeedWidePrototypes
  1247.     unsigned int        /* keycode_entry */,
  1248. #else
  1249.     KeyCode             /* keycode_entry */,
  1250. #endif
  1251.     int                 /* modifier */
  1252. #endif
  1253. );
  1254.  
  1255. extern XModifierKeymap  *XGetModifierMapping(
  1256. #if NeedFunctionPrototypes
  1257.     Display*            /* display */
  1258. #endif
  1259. );
  1260.  
  1261. extern XModifierKeymap  *XInsertModifiermapEntry(
  1262. #if NeedFunctionPrototypes
  1263.     XModifierKeymap*    /* modmap */,
  1264. #if NeedWidePrototypes
  1265.     unsigned int        /* keycode_entry */,
  1266. #else
  1267.     KeyCode             /* keycode_entry */,
  1268. #endif
  1269.     int                 /* modifier */    
  1270. #endif
  1271. );
  1272.  
  1273. extern XModifierKeymap *XNewModifiermap(
  1274. #if NeedFunctionPrototypes
  1275.     int                 /* max_keys_per_mod */
  1276. #endif
  1277. );
  1278.  
  1279. extern XImage *XCreateImage(
  1280. #if NeedFunctionPrototypes
  1281.     Display*            /* display */,
  1282.     Visual*             /* visual */,
  1283.     unsigned int        /* depth */,
  1284.     int                 /* format */,
  1285.     int                 /* offset */,
  1286.     char*               /* data */,
  1287.     unsigned int        /* width */,
  1288.     unsigned int        /* height */,
  1289.     int                 /* bitmap_pad */,
  1290.     int                 /* bytes_per_line */
  1291. #endif
  1292. );
  1293. extern XImage *XGetImage(
  1294. #if NeedFunctionPrototypes
  1295.     Display*            /* display */,
  1296.     Drawable            /* d */,
  1297.     int                 /* x */,
  1298.     int                 /* y */,
  1299.     unsigned int        /* width */,
  1300.     unsigned int        /* height */,
  1301.     unsigned long       /* plane_mask */,
  1302.     int                 /* format */
  1303. #endif
  1304. );
  1305. extern XImage *XGetSubImage(
  1306. #if NeedFunctionPrototypes
  1307.     Display*            /* display */,
  1308.     Drawable            /* d */,
  1309.     int                 /* x */,
  1310.     int                 /* y */,
  1311.     unsigned int        /* width */,
  1312.     unsigned int        /* height */,
  1313.     unsigned long       /* plane_mask */,
  1314.     int                 /* format */,
  1315.     XImage*             /* dest_image */,
  1316.     int                 /* dest_x */,
  1317.     int                 /* dest_y */
  1318. #endif
  1319. );
  1320.  
  1321. /* 
  1322.  * X function declarations.
  1323.  */
  1324. extern Display *XOpenDisplay(
  1325. #if NeedFunctionPrototypes
  1326.     _Xconst char*       /* display_name */
  1327. #endif
  1328. );
  1329.  
  1330. extern void XrmInitialize(
  1331. #if NeedFunctionPrototypes
  1332.     void
  1333. #endif
  1334. );
  1335.  
  1336. extern char *XFetchBytes(
  1337. #if NeedFunctionPrototypes
  1338.     Display*            /* display */,
  1339.     int*                /* nbytes_return */
  1340. #endif
  1341. );
  1342. extern char *XFetchBuffer(
  1343. #if NeedFunctionPrototypes
  1344.     Display*            /* display */,
  1345.     int*                /* nbytes_return */,
  1346.     int                 /* buffer */
  1347. #endif
  1348. );
  1349. extern char *XGetAtomName(
  1350. #if NeedFunctionPrototypes
  1351.     Display*            /* display */,
  1352.     Atom                /* atom */
  1353. #endif
  1354. );
  1355. extern char *XGetDefault(
  1356. #if NeedFunctionPrototypes
  1357.     Display*            /* display */,
  1358.     _Xconst char*       /* program */,
  1359.     _Xconst char*       /* option */              
  1360. #endif
  1361. );
  1362. extern char *XDisplayName(
  1363. #if NeedFunctionPrototypes
  1364.     _Xconst char*       /* string */
  1365. #endif
  1366. );
  1367. extern char *XKeysymToString(
  1368. #if NeedFunctionPrototypes
  1369.     KeySym              /* keysym */
  1370. #endif
  1371. );
  1372.  
  1373. extern int (*XSynchronize(
  1374. #if NeedFunctionPrototypes
  1375.     Display*            /* display */,
  1376.     Bool                /* onoff */
  1377. #endif
  1378. ))();
  1379. extern int (*XSetAfterFunction(
  1380. #if NeedFunctionPrototypes
  1381.     Display*            /* display */,
  1382.     int (*) (
  1383. #if NeedNestedPrototypes
  1384.          Display*   /* display */
  1385. #endif
  1386.         )           /* procedure */
  1387. #endif
  1388. ))();
  1389. extern Atom XInternAtom(
  1390. #if NeedFunctionPrototypes
  1391.     Display*            /* display */,
  1392.     _Xconst char*       /* atom_name */,
  1393.     Bool                /* only_if_exists */             
  1394. #endif
  1395. );
  1396. extern Colormap XCopyColormapAndFree(
  1397. #if NeedFunctionPrototypes
  1398.     Display*            /* display */,
  1399.     Colormap            /* colormap */
  1400. #endif
  1401. );
  1402. extern Colormap XCreateColormap(
  1403. #if NeedFunctionPrototypes
  1404.     Display*            /* display */,
  1405.     Window              /* w */,
  1406.     Visual*             /* visual */,
  1407.     int                 /* alloc */                      
  1408. #endif
  1409. );
  1410. extern Cursor XCreatePixmapCursor(
  1411. #if NeedFunctionPrototypes
  1412.     Display*            /* display */,
  1413.     Pixmap              /* source */,
  1414.     Pixmap              /* mask */,
  1415.     XColor*             /* foreground_color */,
  1416.     XColor*             /* background_color */,
  1417.     unsigned int        /* x */,
  1418.     unsigned int        /* y */                    
  1419. #endif
  1420. );
  1421. extern Cursor XCreateGlyphCursor(
  1422. #if NeedFunctionPrototypes
  1423.     Display*            /* display */,
  1424.     Font                /* source_font */,
  1425.     Font                /* mask_font */,
  1426.     unsigned int        /* source_char */,
  1427.     unsigned int        /* mask_char */,
  1428.     XColor*             /* foreground_color */,
  1429.     XColor*             /* background_color */
  1430. #endif
  1431. );
  1432. extern Cursor XCreateFontCursor(
  1433. #if NeedFunctionPrototypes
  1434.     Display*            /* display */,
  1435.     unsigned int        /* shape */
  1436. #endif
  1437. );
  1438. extern Font XLoadFont(
  1439. #if NeedFunctionPrototypes
  1440.     Display*            /* display */,
  1441.     _Xconst char*       /* name */
  1442. #endif
  1443. );
  1444. extern GC XCreateGC(
  1445. #if NeedFunctionPrototypes
  1446.     Display*            /* display */,
  1447.     Drawable            /* d */,
  1448.     unsigned long       /* valuemask */,
  1449.     XGCValues*          /* values */
  1450. #endif
  1451. );
  1452. extern GContext XGContextFromGC(
  1453. #if NeedFunctionPrototypes
  1454.     GC                  /* gc */
  1455. #endif
  1456. );
  1457. extern void XFlushGC(
  1458. #if NeedFunctionPrototypes
  1459.     Display*            /* display */,
  1460.     GC                  /* gc */
  1461. #endif
  1462. );
  1463. extern Pixmap XCreatePixmap(
  1464. #if NeedFunctionPrototypes
  1465.     Display*            /* display */,
  1466.     Drawable            /* d */,
  1467.     unsigned int        /* width */,
  1468.     unsigned int        /* height */,
  1469.     unsigned int        /* depth */                     
  1470. #endif
  1471. );
  1472. extern Pixmap XCreateBitmapFromData(
  1473. #if NeedFunctionPrototypes
  1474.     Display*            /* display */,
  1475.     Drawable            /* d */,
  1476.     _Xconst char*       /* data */,
  1477.     unsigned int        /* width */,
  1478.     unsigned int        /* height */
  1479. #endif
  1480. );
  1481. extern Pixmap XCreatePixmapFromBitmapData(
  1482. #if NeedFunctionPrototypes
  1483.     Display*            /* display */,
  1484.     Drawable            /* d */,
  1485.     char*               /* data */,
  1486.     unsigned int        /* width */,
  1487.     unsigned int        /* height */,
  1488.     unsigned long       /* fg */,
  1489.     unsigned long       /* bg */,
  1490.     unsigned int        /* depth */
  1491. #endif
  1492. );
  1493. extern Window XCreateSimpleWindow(
  1494. #if NeedFunctionPrototypes
  1495.     Display*            /* display */,
  1496.     Window              /* parent */,
  1497.     int                 /* x */,
  1498.     int                 /* y */,
  1499.     unsigned int        /* width */,
  1500.     unsigned int        /* height */,
  1501.     unsigned int        /* border_width */,
  1502.     unsigned long       /* border */,
  1503.     unsigned long       /* background */
  1504. #endif
  1505. );
  1506. extern Window XGetSelectionOwner(
  1507. #if NeedFunctionPrototypes
  1508.     Display*            /* display */,
  1509.     Atom                /* selection */
  1510. #endif
  1511. );
  1512. extern Window XCreateWindow(
  1513. #if NeedFunctionPrototypes
  1514.     Display*            /* display */,
  1515.     Window              /* parent */,
  1516.     int                 /* x */,
  1517.     int                 /* y */,
  1518.     unsigned int        /* width */,
  1519.     unsigned int        /* height */,
  1520.     unsigned int        /* border_width */,
  1521.     int                 /* depth */,
  1522.     unsigned int        /* class */,
  1523.     Visual*             /* visual */,
  1524.     unsigned long       /* valuemask */,
  1525.     XSetWindowAttributes*       /* attributes */
  1526. #endif
  1527. ); 
  1528. extern Colormap *XListInstalledColormaps(
  1529. #if NeedFunctionPrototypes
  1530.     Display*            /* display */,
  1531.     Window              /* w */,
  1532.     int*                /* num_return */
  1533. #endif
  1534. );
  1535. extern char **XListFonts(
  1536. #if NeedFunctionPrototypes
  1537.     Display*            /* display */,
  1538.     _Xconst char*       /* pattern */,
  1539.     int                 /* maxnames */,
  1540.     int*                /* actual_count_return */
  1541. #endif
  1542. );
  1543. extern char **XListFontsWithInfo(
  1544. #if NeedFunctionPrototypes
  1545.     Display*            /* display */,
  1546.     _Xconst char*       /* pattern */,
  1547.     int                 /* maxnames */,
  1548.     int*                /* count_return */,
  1549.     XFontStruct**       /* info_return */
  1550. #endif
  1551. );
  1552. extern char **XGetFontPath(
  1553. #if NeedFunctionPrototypes
  1554.     Display*            /* display */,
  1555.     int*                /* npaths_return */
  1556. #endif
  1557. );
  1558. extern char **XListExtensions(
  1559. #if NeedFunctionPrototypes
  1560.     Display*            /* display */,
  1561.     int*                /* nextensions_return */
  1562. #endif
  1563. );
  1564. extern Atom *XListProperties(
  1565. #if NeedFunctionPrototypes
  1566.     Display*            /* display */,
  1567.     Window              /* w */,
  1568.     int*                /* num_prop_return */
  1569. #endif
  1570. );
  1571. extern XHostAddress *XListHosts(
  1572. #if NeedFunctionPrototypes
  1573.     Display*            /* display */,
  1574.     int*                /* nhosts_return */,
  1575.     Bool*               /* state_return */
  1576. #endif
  1577. );
  1578. extern KeySym XKeycodeToKeysym(
  1579. #if NeedFunctionPrototypes
  1580.     Display*            /* display */,
  1581. #if NeedWidePrototypes
  1582.     unsigned int        /* keycode */,
  1583. #else
  1584.     KeyCode             /* keycode */,
  1585. #endif
  1586.     int                 /* index */
  1587. #endif
  1588. );
  1589. extern KeySym XLookupKeysym(
  1590. #if NeedFunctionPrototypes
  1591.     XKeyEvent*          /* key_event */,
  1592.     int                 /* index */
  1593. #endif
  1594. );
  1595. extern KeySym *XGetKeyboardMapping(
  1596. #if NeedFunctionPrototypes
  1597.     Display*            /* display */,
  1598. #if NeedWidePrototypes
  1599.     unsigned int        /* first_keycode */,
  1600. #else
  1601.     KeyCode             /* first_keycode */,
  1602. #endif
  1603.     int                 /* keycode_count */,
  1604.     int*                /* keysyms_per_keycode_return */
  1605. #endif
  1606. );
  1607. extern KeySym XStringToKeysym(
  1608. #if NeedFunctionPrototypes
  1609.     _Xconst char*       /* string */
  1610. #endif
  1611. );
  1612. extern long XMaxRequestSize(
  1613. #if NeedFunctionPrototypes
  1614.     Display*            /* display */
  1615. #endif
  1616. );
  1617. extern char *XResourceManagerString(
  1618. #if NeedFunctionPrototypes
  1619.     Display*            /* display */
  1620. #endif
  1621. );
  1622. extern char *XScreenResourceString(
  1623. #if NeedFunctionPrototypes
  1624.     Screen*         /* screen */
  1625. #endif
  1626. );
  1627. extern unsigned long XDisplayMotionBufferSize(
  1628. #if NeedFunctionPrototypes
  1629.     Display*            /* display */
  1630. #endif
  1631. );
  1632. extern VisualID XVisualIDFromVisual(
  1633. #if NeedFunctionPrototypes
  1634.     Visual*             /* visual */
  1635. #endif
  1636. );
  1637.  
  1638. /* routines for dealing with extensions */
  1639.  
  1640. extern XExtCodes *XInitExtension(
  1641. #if NeedFunctionPrototypes
  1642.     Display*            /* display */,
  1643.     _Xconst char*       /* name */
  1644. #endif
  1645. );
  1646.  
  1647. extern XExtCodes *XAddExtension(
  1648. #if NeedFunctionPrototypes
  1649.     Display*            /* display */
  1650. #endif
  1651. );
  1652. extern XExtData *XFindOnExtensionList(
  1653. #if NeedFunctionPrototypes
  1654.     XExtData**          /* structure */,
  1655.     int                 /* number */
  1656. #endif
  1657. );
  1658. extern XExtData **XEHeadOfExtensionList(
  1659. #if NeedFunctionPrototypes
  1660.     XEDataObject        /* object */
  1661. #endif
  1662. );
  1663.  
  1664. /* these are routines for which there are also macros */
  1665. extern Window XRootWindow(
  1666. #if NeedFunctionPrototypes
  1667.     Display*            /* display */,
  1668.     int                 /* screen_number */
  1669. #endif
  1670. );
  1671. extern Window XDefaultRootWindow(
  1672. #if NeedFunctionPrototypes
  1673.     Display*            /* display */
  1674. #endif
  1675. );
  1676. extern Window XRootWindowOfScreen(
  1677. #if NeedFunctionPrototypes
  1678.     Screen*             /* screen */
  1679. #endif
  1680. );
  1681. extern Visual *XDefaultVisual(
  1682. #if NeedFunctionPrototypes
  1683.     Display*            /* display */,
  1684.     int                 /* screen_number */
  1685. #endif
  1686. );
  1687. extern Visual *XDefaultVisualOfScreen(
  1688. #if NeedFunctionPrototypes
  1689.     Screen*             /* screen */
  1690. #endif
  1691. );
  1692. extern GC XDefaultGC(
  1693. #if NeedFunctionPrototypes
  1694.     Display*            /* display */,
  1695.     int                 /* screen_number */
  1696. #endif
  1697. );
  1698. extern GC XDefaultGCOfScreen(
  1699. #if NeedFunctionPrototypes
  1700.     Screen*             /* screen */
  1701. #endif
  1702. );
  1703. extern unsigned long XBlackPixel(
  1704. #if NeedFunctionPrototypes
  1705.     Display*            /* display */,
  1706.     int                 /* screen_number */
  1707. #endif
  1708. );
  1709. extern unsigned long XWhitePixel(
  1710. #if NeedFunctionPrototypes
  1711.     Display*            /* display */,
  1712.     int                 /* screen_number */
  1713. #endif
  1714. );
  1715. extern unsigned long XAllPlanes(
  1716. #if NeedFunctionPrototypes
  1717.     void
  1718. #endif
  1719. );
  1720. extern unsigned long XBlackPixelOfScreen(
  1721. #if NeedFunctionPrototypes
  1722.     Screen*             /* screen */
  1723. #endif
  1724. );
  1725. extern unsigned long XWhitePixelOfScreen(
  1726. #if NeedFunctionPrototypes
  1727.     Screen*             /* screen */
  1728. #endif
  1729. );
  1730. extern unsigned long XNextRequest(
  1731. #if NeedFunctionPrototypes
  1732.     Display*            /* display */
  1733. #endif
  1734. );
  1735. extern unsigned long XLastKnownRequestProcessed(
  1736. #if NeedFunctionPrototypes
  1737.     Display*            /* display */
  1738. #endif
  1739. );
  1740. extern char *XServerVendor(
  1741. #if NeedFunctionPrototypes
  1742.     Display*            /* display */
  1743. #endif
  1744. );
  1745. extern char *XDisplayString(
  1746. #if NeedFunctionPrototypes
  1747.     Display*            /* display */
  1748. #endif
  1749. );
  1750. extern Colormap XDefaultColormap(
  1751. #if NeedFunctionPrototypes
  1752.     Display*            /* display */,
  1753.     int                 /* screen_number */
  1754. #endif
  1755. );
  1756. extern Colormap XDefaultColormapOfScreen(
  1757. #if NeedFunctionPrototypes
  1758.     Screen*             /* screen */
  1759. #endif
  1760. );
  1761. extern Display *XDisplayOfScreen(
  1762. #if NeedFunctionPrototypes
  1763.     Screen*             /* screen */
  1764. #endif
  1765. );
  1766. extern Screen *XScreenOfDisplay(
  1767. #if NeedFunctionPrototypes
  1768.     Display*            /* display */,
  1769.     int                 /* screen_number */
  1770. #endif
  1771. );
  1772. extern Screen *XDefaultScreenOfDisplay(
  1773. #if NeedFunctionPrototypes
  1774.     Display*            /* display */
  1775. #endif
  1776. );
  1777. extern long XEventMaskOfScreen(
  1778. #if NeedFunctionPrototypes
  1779.     Screen*             /* screen */
  1780. #endif
  1781. );
  1782.  
  1783. extern int XScreenNumberOfScreen(
  1784. #if NeedFunctionPrototypes
  1785.     Screen*             /* screen */
  1786. #endif
  1787. );
  1788.  
  1789. typedef int (*XErrorHandler) (      /* WARNING, this type not in Xlib spec */
  1790. #if NeedFunctionPrototypes
  1791.     Display*            /* display */,
  1792.     XErrorEvent*        /* error_event */
  1793. #endif
  1794. );
  1795.  
  1796. extern XErrorHandler XSetErrorHandler (
  1797. #if NeedFunctionPrototypes
  1798.     XErrorHandler       /* handler */
  1799. #endif
  1800. );
  1801.  
  1802.  
  1803. typedef int (*XIOErrorHandler) (    /* WARNING, this type not in Xlib spec */
  1804. #if NeedFunctionPrototypes
  1805.     Display*            /* display */
  1806. #endif
  1807. );
  1808.  
  1809. extern XIOErrorHandler XSetIOErrorHandler (
  1810. #if NeedFunctionPrototypes
  1811.     XIOErrorHandler     /* handler */
  1812. #endif
  1813. );
  1814.  
  1815.  
  1816. extern XPixmapFormatValues *XListPixmapFormats(
  1817. #if NeedFunctionPrototypes
  1818.     Display*            /* display */,
  1819.     int*                /* count_return */
  1820. #endif
  1821. );
  1822. extern int *XListDepths(
  1823. #if NeedFunctionPrototypes
  1824.     Display*            /* display */,
  1825.     int                 /* screen_number */,
  1826.     int*                /* count_return */
  1827. #endif
  1828. );
  1829.  
  1830. /* ICCCM routines for things that don't require special include files; */
  1831. /* other declarations are given in Xutil.h                             */
  1832. extern Status XReconfigureWMWindow(
  1833. #if NeedFunctionPrototypes
  1834.     Display*            /* display */,
  1835.     Window              /* w */,
  1836.     int                 /* screen_number */,
  1837.     unsigned int        /* mask */,
  1838.     XWindowChanges*     /* changes */
  1839. #endif
  1840. );
  1841.  
  1842. extern Status XGetWMProtocols(
  1843. #if NeedFunctionPrototypes
  1844.     Display*            /* display */,
  1845.     Window              /* w */,
  1846.     Atom**              /* protocols_return */,
  1847.     int*                /* count_return */
  1848. #endif
  1849. );
  1850. extern Status XSetWMProtocols(
  1851. #if NeedFunctionPrototypes
  1852.     Display*            /* display */,
  1853.     Window              /* w */,
  1854.     Atom*               /* protocols */,
  1855.     int                 /* count */
  1856. #endif
  1857. );
  1858. extern Status XIconifyWindow(
  1859. #if NeedFunctionPrototypes
  1860.     Display*            /* display */,
  1861.     Window              /* w */,
  1862.     int                 /* screen_number */
  1863. #endif
  1864. );
  1865. extern Status XWithdrawWindow(
  1866. #if NeedFunctionPrototypes
  1867.     Display*            /* display */,
  1868.     Window              /* w */,
  1869.     int                 /* screen_number */
  1870. #endif
  1871. );
  1872. extern Status XGetCommand(
  1873. #if NeedFunctionPrototypes
  1874.     Display*            /* display */,
  1875.     Window              /* w */,
  1876.     char***             /* argv_return */,
  1877.     int*                /* argc_return */
  1878. #endif
  1879. );
  1880. extern Status XGetWMColormapWindows(
  1881. #if NeedFunctionPrototypes
  1882.     Display*            /* display */,
  1883.     Window              /* w */,
  1884.     Window**            /* windows_return */,
  1885.     int*                /* count_return */
  1886. #endif
  1887. );
  1888. extern Status XSetWMColormapWindows(
  1889. #if NeedFunctionPrototypes
  1890.     Display*            /* display */,
  1891.     Window              /* w */,
  1892.     Window*             /* colormap_windows */,
  1893.     int                 /* count */
  1894. #endif
  1895. );
  1896. extern void XFreeStringList(
  1897. #if NeedFunctionPrototypes
  1898.     char**              /* list */
  1899. #endif
  1900. );
  1901. extern XSetTransientForHint(
  1902. #if NeedFunctionPrototypes
  1903.     Display*            /* display */,
  1904.     Window              /* w */,
  1905.     Window              /* prop_window */
  1906. #endif
  1907. );
  1908.  
  1909. /* The following are given in alphabetical order */
  1910.  
  1911. extern XActivateScreenSaver(
  1912. #if NeedFunctionPrototypes
  1913.     Display*            /* display */
  1914. #endif
  1915. );
  1916.  
  1917. extern XAddHost(
  1918. #if NeedFunctionPrototypes
  1919.     Display*            /* display */,
  1920.     XHostAddress*       /* host */
  1921. #endif
  1922. );
  1923.  
  1924. extern XAddHosts(
  1925. #if NeedFunctionPrototypes
  1926.     Display*            /* display */,
  1927.     XHostAddress*       /* hosts */,
  1928.     int                 /* num_hosts */    
  1929. #endif
  1930. );
  1931.  
  1932. extern XAddToExtensionList(
  1933. #if NeedFunctionPrototypes
  1934.     struct _XExtData**  /* structure */,
  1935.     XExtData*           /* ext_data */
  1936. #endif
  1937. );
  1938.  
  1939. extern XAddToSaveSet(
  1940. #if NeedFunctionPrototypes
  1941.     Display*            /* display */,
  1942.     Window              /* w */
  1943. #endif
  1944. );
  1945.  
  1946. extern Status XAllocColor(
  1947. #if NeedFunctionPrototypes
  1948.     Display*            /* display */,
  1949.     Colormap            /* colormap */,
  1950.     XColor*             /* screen_in_out */
  1951. #endif
  1952. );
  1953.  
  1954. extern Status XAllocColorCells(
  1955. #if NeedFunctionPrototypes
  1956.     Display*            /* display */,
  1957.     Colormap            /* colormap */,
  1958.     Bool                /* contig */,
  1959.     unsigned long*      /* plane_masks_return */,
  1960.     unsigned int        /* nplanes */,
  1961.     unsigned long*      /* pixels_return */,
  1962.     unsigned int        /* npixels */
  1963. #endif
  1964. );
  1965.  
  1966. extern Status XAllocColorPlanes(
  1967. #if NeedFunctionPrototypes
  1968.     Display*            /* display */,
  1969.     Colormap            /* colormap */,
  1970.     Bool                /* contig */,
  1971.     unsigned long*      /* pixels_return */,
  1972.     int                 /* ncolors */,
  1973.     int                 /* nreds */,
  1974.     int                 /* ngreens */,
  1975.     int                 /* nblues */,
  1976.     unsigned long*      /* rmask_return */,
  1977.     unsigned long*      /* gmask_return */,
  1978.     unsigned long*      /* bmask_return */
  1979. #endif
  1980. );
  1981.  
  1982. extern Status XAllocNamedColor(
  1983. #if NeedFunctionPrototypes
  1984.     Display*            /* display */,
  1985.     Colormap            /* colormap */,
  1986.     _Xconst char*       /* color_name */,
  1987.     XColor*             /* screen_def_return */,
  1988.     XColor*             /* exact_def_return */
  1989. #endif
  1990. );
  1991.  
  1992. extern XAllowEvents(
  1993. #if NeedFunctionPrototypes
  1994.     Display*            /* display */,
  1995.     int                 /* event_mode */,
  1996.     Time                /* time */
  1997. #endif
  1998. );
  1999.  
  2000. extern XAutoRepeatOff(
  2001. #if NeedFunctionPrototypes
  2002.     Display*            /* display */
  2003. #endif
  2004. );
  2005.  
  2006. extern XAutoRepeatOn(
  2007. #if NeedFunctionPrototypes
  2008.     Display*            /* display */
  2009. #endif
  2010. );
  2011.  
  2012. extern XBell(
  2013. #if NeedFunctionPrototypes
  2014.     Display*            /* display */,
  2015.     int                 /* percent */
  2016. #endif
  2017. );
  2018.  
  2019. extern int XBitmapBitOrder(
  2020. #if NeedFunctionPrototypes
  2021.     Display*            /* display */
  2022. #endif
  2023. );
  2024.  
  2025. extern int XBitmapPad(
  2026. #if NeedFunctionPrototypes
  2027.     Display*            /* display */
  2028. #endif
  2029. );
  2030.  
  2031. extern int XBitmapUnit(
  2032. #if NeedFunctionPrototypes
  2033.     Display*            /* display */
  2034. #endif
  2035. );
  2036.  
  2037. extern int XCellsOfScreen(
  2038. #if NeedFunctionPrototypes
  2039.     Screen*             /* screen */
  2040. #endif
  2041. );
  2042.  
  2043. extern XChangeActivePointerGrab(
  2044. #if NeedFunctionPrototypes
  2045.     Display*            /* display */,
  2046.     unsigned int        /* event_mask */,
  2047.     Cursor              /* cursor */,
  2048.     Time                /* time */
  2049. #endif
  2050. );
  2051.  
  2052. extern XChangeGC(
  2053. #if NeedFunctionPrototypes
  2054.     Display*            /* display */,
  2055.     GC                  /* gc */,
  2056.     unsigned long       /* valuemask */,
  2057.     XGCValues*          /* values */
  2058. #endif
  2059. );
  2060.  
  2061. extern XChangeKeyboardControl(
  2062. #if NeedFunctionPrototypes
  2063.     Display*            /* display */,
  2064.     unsigned long       /* value_mask */,
  2065.     XKeyboardControl*   /* values */
  2066. #endif
  2067. );
  2068.  
  2069. extern XChangeKeyboardMapping(
  2070. #if NeedFunctionPrototypes
  2071.     Display*            /* display */,
  2072.     int                 /* first_keycode */,
  2073.     int                 /* keysyms_per_keycode */,
  2074.     KeySym*             /* keysyms */,
  2075.     int                 /* num_codes */
  2076. #endif
  2077. );
  2078.  
  2079. extern XChangePointerControl(
  2080. #if NeedFunctionPrototypes
  2081.     Display*            /* display */,
  2082.     Bool                /* do_accel */,
  2083.     Bool                /* do_threshold */,
  2084.     int                 /* accel_numerator */,
  2085.     int                 /* accel_denominator */,
  2086.     int                 /* threshold */
  2087. #endif
  2088. );
  2089.  
  2090. extern XChangeProperty(
  2091. #if NeedFunctionPrototypes
  2092.     Display*            /* display */,
  2093.     Window              /* w */,
  2094.     Atom                /* property */,
  2095.     Atom                /* type */,
  2096.     int                 /* format */,
  2097.     int                 /* mode */,
  2098.     _Xconst unsigned char*      /* data */,
  2099.     int                 /* nelements */
  2100. #endif
  2101. );
  2102.  
  2103. extern XChangeSaveSet(
  2104. #if NeedFunctionPrototypes
  2105.     Display*            /* display */,
  2106.     Window              /* w */,
  2107.     int                 /* change_mode */
  2108. #endif
  2109. );
  2110.  
  2111. extern XChangeWindowAttributes(
  2112. #if NeedFunctionPrototypes
  2113.     Display*            /* display */,
  2114.     Window              /* w */,
  2115.     unsigned long       /* valuemask */,
  2116.     XSetWindowAttributes* /* attributes */
  2117. #endif
  2118. );
  2119.  
  2120. extern Bool XCheckIfEvent(
  2121. #if NeedFunctionPrototypes
  2122.     Display*            /* display */,
  2123.     XEvent*             /* event_return */,
  2124.     Bool (*) (
  2125. #if NeedNestedPrototypes
  2126.            Display*                 /* display */,
  2127.            XEvent*                  /* event */,
  2128.            XPointer                 /* arg */
  2129. #endif
  2130.          )          /* predicate */,
  2131.     XPointer            /* arg */
  2132. #endif
  2133. );
  2134.  
  2135. extern Bool XCheckMaskEvent(
  2136. #if NeedFunctionPrototypes
  2137.     Display*            /* display */,
  2138.     long                /* event_mask */,
  2139.     XEvent*             /* event_return */
  2140. #endif
  2141. );
  2142.  
  2143. extern Bool XCheckTypedEvent(
  2144. #if NeedFunctionPrototypes
  2145.     Display*            /* display */,
  2146.     int                 /* event_type */,
  2147.     XEvent*             /* event_return */
  2148. #endif
  2149. );
  2150.  
  2151. extern Bool XCheckTypedWindowEvent(
  2152. #if NeedFunctionPrototypes
  2153.     Display*            /* display */,
  2154.     Window              /* w */,
  2155.     int                 /* event_type */,
  2156.     XEvent*             /* event_return */
  2157. #endif
  2158. );
  2159.  
  2160. extern Bool XCheckWindowEvent(
  2161. #if NeedFunctionPrototypes
  2162.     Display*            /* display */,
  2163.     Window              /* w */,
  2164.     long                /* event_mask */,
  2165.     XEvent*             /* event_return */
  2166. #endif
  2167. );
  2168.  
  2169. extern XCirculateSubwindows(
  2170. #if NeedFunctionPrototypes
  2171.     Display*            /* display */,
  2172.     Window              /* w */,
  2173.     int                 /* direction */
  2174. #endif
  2175. );
  2176.  
  2177. extern XCirculateSubwindowsDown(
  2178. #if NeedFunctionPrototypes
  2179.     Display*            /* display */,
  2180.     Window              /* w */
  2181. #endif
  2182. );
  2183.  
  2184. extern XCirculateSubwindowsUp(
  2185. #if NeedFunctionPrototypes
  2186.     Display*            /* display */,
  2187.     Window              /* w */
  2188. #endif
  2189. );
  2190.  
  2191. extern XClearArea(
  2192. #if NeedFunctionPrototypes
  2193.     Display*            /* display */,
  2194.     Window              /* w */,
  2195.     int                 /* x */,
  2196.     int                 /* y */,
  2197.     unsigned int        /* width */,
  2198.     unsigned int        /* height */,
  2199.     Bool                /* exposures */
  2200. #endif
  2201. );
  2202.  
  2203. extern XClearWindow(
  2204. #if NeedFunctionPrototypes
  2205.     Display*            /* display */,
  2206.     Window              /* w */
  2207. #endif
  2208. );
  2209.  
  2210. extern XCloseDisplay(
  2211. #if NeedFunctionPrototypes
  2212.     Display*            /* display */
  2213. #endif
  2214. );
  2215.  
  2216. extern XConfigureWindow(
  2217. #if NeedFunctionPrototypes
  2218.     Display*            /* display */,
  2219.     Window              /* w */,
  2220.     unsigned int        /* value_mask */,
  2221.     XWindowChanges*     /* values */             
  2222. #endif
  2223. );
  2224.  
  2225. extern int XConnectionNumber(
  2226. #if NeedFunctionPrototypes
  2227.     Display*            /* display */
  2228. #endif
  2229. );
  2230.  
  2231. extern XConvertSelection(
  2232. #if NeedFunctionPrototypes
  2233.     Display*            /* display */,
  2234.     Atom                /* selection */,
  2235.     Atom                /* target */,
  2236.     Atom                /* property */,
  2237.     Window              /* requestor */,
  2238.     Time                /* time */
  2239. #endif
  2240. );
  2241.  
  2242. extern XCopyArea(
  2243. #if NeedFunctionPrototypes
  2244.     Display*            /* display */,
  2245.     Drawable            /* src */,
  2246.     Drawable            /* dest */,
  2247.     GC                  /* gc */,
  2248.     int                 /* src_x */,
  2249.     int                 /* src_y */,
  2250.     unsigned int        /* width */,
  2251.     unsigned int        /* height */,
  2252.     int                 /* dest_x */,
  2253.     int                 /* dest_y */
  2254. #endif
  2255. );
  2256.  
  2257. extern XCopyGC(
  2258. #if NeedFunctionPrototypes
  2259.     Display*            /* display */,
  2260.     GC                  /* src */,
  2261.     unsigned long       /* valuemask */,
  2262.     GC                  /* dest */
  2263. #endif
  2264. );
  2265.  
  2266. extern XCopyPlane(
  2267. #if NeedFunctionPrototypes
  2268.     Display*            /* display */,
  2269.     Drawable            /* src */,
  2270.     Drawable            /* dest */,
  2271.     GC                  /* gc */,
  2272.     int                 /* src_x */,
  2273.     int                 /* src_y */,
  2274.     unsigned int        /* width */,
  2275.     unsigned int        /* height */,
  2276.     int                 /* dest_x */,
  2277.     int                 /* dest_y */,
  2278.     unsigned long       /* plane */
  2279. #endif
  2280. );
  2281.  
  2282. extern int XDefaultDepth(
  2283. #if NeedFunctionPrototypes
  2284.     Display*            /* display */,
  2285.     int                 /* screen_number */
  2286. #endif
  2287. );
  2288.  
  2289. extern int XDefaultDepthOfScreen(
  2290. #if NeedFunctionPrototypes
  2291.     Screen*             /* screen */
  2292. #endif
  2293. );
  2294.  
  2295. extern int XDefaultScreen(
  2296. #if NeedFunctionPrototypes
  2297.     Display*            /* display */
  2298. #endif
  2299. );
  2300.  
  2301. extern XDefineCursor(
  2302. #if NeedFunctionPrototypes
  2303.     Display*            /* display */,
  2304.     Window              /* w */,
  2305.     Cursor              /* cursor */
  2306. #endif
  2307. );
  2308.  
  2309. extern XDeleteProperty(
  2310. #if NeedFunctionPrototypes
  2311.     Display*            /* display */,
  2312.     Window              /* w */,
  2313.     Atom                /* property */
  2314. #endif
  2315. );
  2316.  
  2317. extern XDestroyWindow(
  2318. #if NeedFunctionPrototypes
  2319.     Display*            /* display */,
  2320.     Window              /* w */
  2321. #endif
  2322. );
  2323.  
  2324. extern XDestroySubwindows(
  2325. #if NeedFunctionPrototypes
  2326.     Display*            /* display */,
  2327.     Window              /* w */
  2328. #endif
  2329. );
  2330.  
  2331. extern int XDoesBackingStore(
  2332. #if NeedFunctionPrototypes
  2333.     Screen*             /* screen */    
  2334. #endif
  2335. );
  2336.  
  2337. extern Bool XDoesSaveUnders(
  2338. #if NeedFunctionPrototypes
  2339.     Screen*             /* screen */
  2340. #endif
  2341. );
  2342.  
  2343. extern XDisableAccessControl(
  2344. #if NeedFunctionPrototypes
  2345.     Display*            /* display */
  2346. #endif
  2347. );
  2348.  
  2349.  
  2350. extern int XDisplayCells(
  2351. #if NeedFunctionPrototypes
  2352.     Display*            /* display */,
  2353.     int                 /* screen_number */
  2354. #endif
  2355. );
  2356.  
  2357. extern int XDisplayHeight(
  2358. #if NeedFunctionPrototypes
  2359.     Display*            /* display */,
  2360.     int                 /* screen_number */
  2361. #endif
  2362. );
  2363.  
  2364. extern int XDisplayHeightMM(
  2365. #if NeedFunctionPrototypes
  2366.     Display*            /* display */,
  2367.     int                 /* screen_number */
  2368. #endif
  2369. );
  2370.  
  2371. extern XDisplayKeycodes(
  2372. #if NeedFunctionPrototypes
  2373.     Display*            /* display */,
  2374.     int*                /* min_keycodes_return */,
  2375.     int*                /* max_keycodes_return */
  2376. #endif
  2377. );
  2378.  
  2379. extern int XDisplayPlanes(
  2380. #if NeedFunctionPrototypes
  2381.     Display*            /* display */,
  2382.     int                 /* screen_number */
  2383. #endif
  2384. );
  2385.  
  2386. extern int XDisplayWidth(
  2387. #if NeedFunctionPrototypes
  2388.     Display*            /* display */,
  2389.     int                 /* screen_number */
  2390. #endif
  2391. );
  2392.  
  2393. extern int XDisplayWidthMM(
  2394. #if NeedFunctionPrototypes
  2395.     Display*            /* display */,
  2396.     int                 /* screen_number */
  2397. #endif
  2398. );
  2399.  
  2400. extern XDrawArc(
  2401. #if NeedFunctionPrototypes
  2402.     Display*            /* display */,
  2403.     Drawable            /* d */,
  2404.     GC                  /* gc */,
  2405.     int                 /* x */,
  2406.     int                 /* y */,
  2407.     unsigned int        /* width */,
  2408.     unsigned int        /* height */,
  2409.     int                 /* angle1 */,
  2410.     int                 /* angle2 */
  2411. #endif
  2412. );
  2413.  
  2414. extern XDrawArcs(
  2415. #if NeedFunctionPrototypes
  2416.     Display*            /* display */,
  2417.     Drawable            /* d */,
  2418.     GC                  /* gc */,
  2419.     XArc*               /* arcs */,
  2420.     int                 /* narcs */
  2421. #endif
  2422. );
  2423.  
  2424. extern XDrawImageString(
  2425. #if NeedFunctionPrototypes
  2426.     Display*            /* display */,
  2427.     Drawable            /* d */,
  2428.     GC                  /* gc */,
  2429.     int                 /* x */,
  2430.     int                 /* y */,
  2431.     _Xconst char*       /* string */,
  2432.     int                 /* length */
  2433. #endif
  2434. );
  2435.  
  2436. extern XDrawImageString16(
  2437. #if NeedFunctionPrototypes
  2438.     Display*            /* display */,
  2439.     Drawable            /* d */,
  2440.     GC                  /* gc */,
  2441.     int                 /* x */,
  2442.     int                 /* y */,
  2443.     _Xconst XChar2b*    /* string */,
  2444.     int                 /* length */
  2445. #endif
  2446. );
  2447.  
  2448. extern XDrawLine(
  2449. #if NeedFunctionPrototypes
  2450.     Display*            /* display */,
  2451.     Drawable            /* d */,
  2452.     GC                  /* gc */,
  2453.     int                 /* x1 */,
  2454.     int                 /* x2 */,
  2455.     int                 /* y1 */,
  2456.     int                 /* y2 */
  2457. #endif
  2458. );
  2459.  
  2460. extern XDrawLines(
  2461. #if NeedFunctionPrototypes
  2462.     Display*            /* display */,
  2463.     Drawable            /* d */,
  2464.     GC                  /* gc */,
  2465.     XPoint*             /* points */,
  2466.     int                 /* npoints */,
  2467.     int                 /* mode */
  2468. #endif
  2469. );
  2470.  
  2471. extern XDrawPoint(
  2472. #if NeedFunctionPrototypes
  2473.     Display*            /* display */,
  2474.     Drawable            /* d */,
  2475.     GC                  /* gc */,
  2476.     int                 /* x */,
  2477.     int                 /* y */
  2478. #endif
  2479. );
  2480.  
  2481. extern XDrawPoints(
  2482. #if NeedFunctionPrototypes
  2483.     Display*            /* display */,
  2484.     Drawable            /* d */,
  2485.     GC                  /* gc */,
  2486.     XPoint*             /* points */,
  2487.     int                 /* npoints */,
  2488.     int                 /* mode */
  2489. #endif
  2490. );
  2491.  
  2492. extern XDrawRectangle(
  2493. #if NeedFunctionPrototypes
  2494.     Display*            /* display */,
  2495.     Drawable            /* d */,
  2496.     GC                  /* gc */,
  2497.     int                 /* x */,
  2498.     int                 /* y */,
  2499.     unsigned int        /* width */,
  2500.     unsigned int        /* height */
  2501. #endif
  2502. );
  2503.  
  2504. extern XDrawRectangles(
  2505. #if NeedFunctionPrototypes
  2506.     Display*            /* display */,
  2507.     Drawable            /* d */,
  2508.     GC                  /* gc */,
  2509.     XRectangle*         /* rectangles */,
  2510.     int                 /* nrectangles */
  2511. #endif
  2512. );
  2513.  
  2514. extern XDrawSegments(
  2515. #if NeedFunctionPrototypes
  2516.     Display*            /* display */,
  2517.     Drawable            /* d */,
  2518.     GC                  /* gc */,
  2519.     XSegment*           /* segments */,
  2520.     int                 /* nsegments */
  2521. #endif
  2522. );
  2523.  
  2524. extern XDrawString(
  2525. #if NeedFunctionPrototypes
  2526.     Display*            /* display */,
  2527.     Drawable            /* d */,
  2528.     GC                  /* gc */,
  2529.     int                 /* x */,
  2530.     int                 /* y */,
  2531.     _Xconst char*       /* string */,
  2532.     int                 /* length */
  2533. #endif
  2534. );
  2535.  
  2536. extern XDrawString16(
  2537. #if NeedFunctionPrototypes
  2538.     Display*            /* display */,
  2539.     Drawable            /* d */,
  2540.     GC                  /* gc */,
  2541.     int                 /* x */,
  2542.     int                 /* y */,
  2543.     _Xconst XChar2b*    /* string */,
  2544.     int                 /* length */
  2545. #endif
  2546. );
  2547.  
  2548. extern XDrawText(
  2549. #if NeedFunctionPrototypes
  2550.     Display*            /* display */,
  2551.     Drawable            /* d */,
  2552.     GC                  /* gc */,
  2553.     int                 /* x */,
  2554.     int                 /* y */,
  2555.     XTextItem*          /* items */,
  2556.     int                 /* nitems */
  2557. #endif
  2558. );
  2559.  
  2560. extern XDrawText16(
  2561. #if NeedFunctionPrototypes
  2562.     Display*            /* display */,
  2563.     Drawable            /* d */,
  2564.     GC                  /* gc */,
  2565.     int                 /* x */,
  2566.     int                 /* y */,
  2567.     XTextItem16*        /* items */,
  2568.     int                 /* nitems */
  2569. #endif
  2570. );
  2571.  
  2572. extern XEnableAccessControl(
  2573. #if NeedFunctionPrototypes
  2574.     Display*            /* display */
  2575. #endif
  2576. );
  2577.  
  2578. extern int XEventsQueued(
  2579. #if NeedFunctionPrototypes
  2580.     Display*            /* display */,
  2581.     int                 /* mode */
  2582. #endif
  2583. );
  2584.  
  2585. extern Status XFetchName(
  2586. #if NeedFunctionPrototypes
  2587.     Display*            /* display */,
  2588.     Window              /* w */,
  2589.     char**              /* window_name_return */
  2590. #endif
  2591. );
  2592.  
  2593. extern XFillArc(
  2594. #if NeedFunctionPrototypes
  2595.     Display*            /* display */,
  2596.     Drawable            /* d */,
  2597.     GC                  /* gc */,
  2598.     int                 /* x */,
  2599.     int                 /* y */,
  2600.     unsigned int        /* width */,
  2601.     unsigned int        /* height */,
  2602.     int                 /* angle1 */,
  2603.     int                 /* angle2 */
  2604. #endif
  2605. );
  2606.  
  2607. extern XFillArcs(
  2608. #if NeedFunctionPrototypes
  2609.     Display*            /* display */,
  2610.     Drawable            /* d */,
  2611.     GC                  /* gc */,
  2612.     XArc*               /* arcs */,
  2613.     int                 /* narcs */
  2614. #endif
  2615. );
  2616.  
  2617. extern XFillPolygon(
  2618. #if NeedFunctionPrototypes
  2619.     Display*            /* display */,
  2620.     Drawable            /* d */,
  2621.     GC                  /* gc */,
  2622.     XPoint*             /* points */,
  2623.     int                 /* npoints */,
  2624.     int                 /* shape */,
  2625.     int                 /* mode */
  2626. #endif
  2627. );
  2628.  
  2629. extern XFillRectangle(
  2630. #if NeedFunctionPrototypes
  2631.     Display*            /* display */,
  2632.     Drawable            /* d */,
  2633.     GC                  /* gc */,
  2634.     int                 /* x */,
  2635.     int                 /* y */,
  2636.     unsigned int        /* width */,
  2637.     unsigned int        /* height */
  2638. #endif
  2639. );
  2640.  
  2641. extern XFillRectangles(
  2642. #if NeedFunctionPrototypes
  2643.     Display*            /* display */,
  2644.     Drawable            /* d */,
  2645.     GC                  /* gc */,
  2646.     XRectangle*         /* rectangles */,
  2647.     int                 /* nrectangles */
  2648. #endif
  2649. );
  2650.  
  2651. extern XFlush(
  2652. #if NeedFunctionPrototypes
  2653.     Display*            /* display */
  2654. #endif
  2655. );
  2656.  
  2657. extern XForceScreenSaver(
  2658. #if NeedFunctionPrototypes
  2659.     Display*            /* display */,
  2660.     int                 /* mode */
  2661. #endif
  2662. );
  2663.  
  2664. extern XFree(
  2665. #if NeedFunctionPrototypes
  2666.     void*               /* data */
  2667. #endif
  2668. );
  2669.  
  2670. extern XFreeColormap(
  2671. #if NeedFunctionPrototypes
  2672.     Display*            /* display */,
  2673.     Colormap            /* colormap */
  2674. #endif
  2675. );
  2676.  
  2677. extern XFreeColors(
  2678. #if NeedFunctionPrototypes
  2679.     Display*            /* display */,
  2680.     Colormap            /* colormap */,
  2681.     unsigned long*      /* pixels */,
  2682.     int                 /* npixels */,
  2683.     unsigned long       /* planes */
  2684. #endif
  2685. );
  2686.  
  2687. extern XFreeCursor(
  2688. #if NeedFunctionPrototypes
  2689.     Display*            /* display */,
  2690.     Cursor              /* cursor */
  2691. #endif
  2692. );
  2693.  
  2694. extern XFreeExtensionList(
  2695. #if NeedFunctionPrototypes
  2696.     char**              /* list */    
  2697. #endif
  2698. );
  2699.  
  2700. extern XFreeFont(
  2701. #if NeedFunctionPrototypes
  2702.     Display*            /* display */,
  2703.     XFontStruct*        /* font_struct */
  2704. #endif
  2705. );
  2706.  
  2707. extern XFreeFontInfo(
  2708. #if NeedFunctionPrototypes
  2709.     char**              /* names */,
  2710.     XFontStruct*        /* free_info */,
  2711.     int                 /* actual_count */
  2712. #endif
  2713. );
  2714.  
  2715. extern XFreeFontNames(
  2716. #if NeedFunctionPrototypes
  2717.     char**              /* list */
  2718. #endif
  2719. );
  2720.  
  2721. extern XFreeFontPath(
  2722. #if NeedFunctionPrototypes
  2723.     char**              /* list */
  2724. #endif
  2725. );
  2726.  
  2727. extern XFreeGC(
  2728. #if NeedFunctionPrototypes
  2729.     Display*            /* display */,
  2730.     GC                  /* gc */
  2731. #endif
  2732. );
  2733.  
  2734. extern XFreeModifiermap(
  2735. #if NeedFunctionPrototypes
  2736.     XModifierKeymap*    /* modmap */
  2737. #endif
  2738. );
  2739.  
  2740. extern XFreePixmap(
  2741. #if NeedFunctionPrototypes
  2742.     Display*            /* display */,
  2743.     Pixmap              /* pixmap */
  2744. #endif
  2745. );
  2746.  
  2747. extern int XGeometry(
  2748. #if NeedFunctionPrototypes
  2749.     Display*            /* display */,
  2750.     int                 /* screen */,
  2751.     _Xconst char*       /* position */,
  2752.     _Xconst char*       /* default_position */,
  2753.     unsigned int        /* bwidth */,
  2754.     unsigned int        /* fwidth */,
  2755.     unsigned int        /* fheight */,
  2756.     int                 /* xadder */,
  2757.     int                 /* yadder */,
  2758.     int*                /* x_return */,
  2759.     int*                /* y_return */,
  2760.     int*                /* width_return */,
  2761.     int*                /* height_return */
  2762. #endif
  2763. );
  2764.  
  2765. extern XGetErrorDatabaseText(
  2766. #if NeedFunctionPrototypes
  2767.     Display*            /* display */,
  2768.     _Xconst char*       /* name */,
  2769.     _Xconst char*       /* message */,
  2770.     _Xconst char*       /* default_string */,
  2771.     char*               /* buffer_return */,
  2772.     int                 /* length */
  2773. #endif
  2774. );
  2775.  
  2776. extern XGetErrorText(
  2777. #if NeedFunctionPrototypes
  2778.     Display*            /* display */,
  2779.     int                 /* code */,
  2780.     char*               /* buffer_return */,
  2781.     int                 /* length */
  2782. #endif
  2783. );
  2784.  
  2785. extern Bool XGetFontProperty(
  2786. #if NeedFunctionPrototypes
  2787.     XFontStruct*        /* font_struct */,
  2788.     Atom                /* atom */,
  2789.     unsigned long*      /* value_return */
  2790. #endif
  2791. );
  2792.  
  2793. extern Status XGetGCValues(
  2794. #if NeedFunctionPrototypes
  2795.     Display*            /* display */,
  2796.     GC                  /* gc */,
  2797.     unsigned long       /* valuemask */,
  2798.     XGCValues*          /* values_return */
  2799. #endif
  2800. );
  2801.  
  2802. extern Status XGetGeometry(
  2803. #if NeedFunctionPrototypes
  2804.     Display*            /* display */,
  2805.     Drawable            /* d */,
  2806.     Window*             /* root_return */,
  2807.     int*                /* x_return */,
  2808.     int*                /* y_return */,
  2809.     unsigned int*       /* width_return */,
  2810.     unsigned int*       /* height_return */,
  2811.     unsigned int*       /* border_width_return */,
  2812.     unsigned int*       /* depth_return */
  2813. #endif
  2814. );
  2815.  
  2816. extern Status XGetIconName(
  2817. #if NeedFunctionPrototypes
  2818.     Display*            /* display */,
  2819.     Window              /* w */,
  2820.     char**              /* icon_name_return */
  2821. #endif
  2822. );
  2823.  
  2824. extern XGetInputFocus(
  2825. #if NeedFunctionPrototypes
  2826.     Display*            /* display */,
  2827.     Window*             /* focus_return */,
  2828.     int*                /* revert_to_return */
  2829. #endif
  2830. );
  2831.  
  2832. extern XGetKeyboardControl(
  2833. #if NeedFunctionPrototypes
  2834.     Display*            /* display */,
  2835.     XKeyboardState*     /* values_return */
  2836. #endif
  2837. );
  2838.  
  2839. extern XGetPointerControl(
  2840. #if NeedFunctionPrototypes
  2841.     Display*            /* display */,
  2842.     int*                /* accel_numerator_return */,
  2843.     int*                /* accel_denominator_return */,
  2844.     int*                /* threshold_return */
  2845. #endif
  2846. );
  2847.  
  2848. extern int XGetPointerMapping(
  2849. #if NeedFunctionPrototypes
  2850.     Display*            /* display */,
  2851.     unsigned char*      /* map_return */,
  2852.     int                 /* nmap */
  2853. #endif
  2854. );
  2855.  
  2856. extern XGetScreenSaver(
  2857. #if NeedFunctionPrototypes
  2858.     Display*            /* display */,
  2859.     int*                /* timeout_return */,
  2860.     int*                /* interval_return */,
  2861.     int*                /* prefer_blanking_return */,
  2862.     int*                /* allow_exposures_return */
  2863. #endif
  2864. );
  2865.  
  2866. extern Status XGetTransientForHint(
  2867. #if NeedFunctionPrototypes
  2868.     Display*            /* display */,
  2869.     Window              /* w */,
  2870.     Window*             /* prop_window_return */
  2871. #endif
  2872. );
  2873.  
  2874. extern int XGetWindowProperty(
  2875. #if NeedFunctionPrototypes
  2876.     Display*            /* display */,
  2877.     Window              /* w */,
  2878.     Atom                /* property */,
  2879.     long                /* long_offset */,
  2880.     long                /* long_length */,
  2881.     Bool                /* delete */,
  2882.     Atom                /* req_type */,
  2883.     Atom*               /* actual_type_return */,
  2884.     int*                /* actual_format_return */,
  2885.     unsigned long*      /* nitems_return */,
  2886.     unsigned long*      /* bytes_after_return */,
  2887.     unsigned char**     /* prop_return */
  2888. #endif
  2889. );
  2890.  
  2891. extern Status XGetWindowAttributes(
  2892. #if NeedFunctionPrototypes
  2893.     Display*            /* display */,
  2894.     Window              /* w */,
  2895.     XWindowAttributes*  /* window_attributes_return */
  2896. #endif
  2897. );
  2898.  
  2899. extern XGrabButton(
  2900. #if NeedFunctionPrototypes
  2901.     Display*            /* display */,
  2902.     unsigned int        /* button */,
  2903.     unsigned int        /* modifiers */,
  2904.     Window              /* grab_window */,
  2905.     Bool                /* owner_events */,
  2906.     unsigned int        /* event_mask */,
  2907.     int                 /* pointer_mode */,
  2908.     int                 /* keyboard_mode */,
  2909.     Window              /* confine_to */,
  2910.     Cursor              /* cursor */
  2911. #endif
  2912. );
  2913.  
  2914. extern XGrabKey(
  2915. #if NeedFunctionPrototypes
  2916.     Display*            /* display */,
  2917.     int                 /* keycode */,
  2918.     unsigned int        /* modifiers */,
  2919.     Window              /* grab_window */,
  2920.     Bool                /* owner_events */,
  2921.     int                 /* pointer_mode */,
  2922.     int                 /* keyboard_mode */
  2923. #endif
  2924. );
  2925.  
  2926. extern int XGrabKeyboard(
  2927. #if NeedFunctionPrototypes
  2928.     Display*            /* display */,
  2929.     Window              /* grab_window */,
  2930.     Bool                /* owner_events */,
  2931.     int                 /* pointer_mode */,
  2932.     int                 /* keyboard_mode */,
  2933.     Time                /* time */
  2934. #endif
  2935. );
  2936.  
  2937. extern int XGrabPointer(
  2938. #if NeedFunctionPrototypes
  2939.     Display*            /* display */,
  2940.     Window              /* grab_window */,
  2941.     Bool                /* owner_events */,
  2942.     unsigned int        /* event_mask */,
  2943.     int                 /* pointer_mode */,
  2944.     int                 /* keyboard_mode */,
  2945.     Window              /* confine_to */,
  2946.     Cursor              /* cursor */,
  2947.     Time                /* time */
  2948. #endif
  2949. );
  2950.  
  2951. extern XGrabServer(
  2952. #if NeedFunctionPrototypes
  2953.     Display*            /* display */
  2954. #endif
  2955. );
  2956.  
  2957. extern int XHeightMMOfScreen(
  2958. #if NeedFunctionPrototypes
  2959.     Screen*             /* screen */
  2960. #endif
  2961. );
  2962.  
  2963. extern int XHeightOfScreen(
  2964. #if NeedFunctionPrototypes
  2965.     Screen*             /* screen */
  2966. #endif
  2967. );
  2968.  
  2969. extern XIfEvent(
  2970. #if NeedFunctionPrototypes
  2971.     Display*            /* display */,
  2972.     XEvent*             /* event_return */,
  2973.     Bool (*) (
  2974. #if NeedNestedPrototypes
  2975.            Display*                 /* display */,
  2976.            XEvent*                  /* event */,
  2977.            XPointer                 /* arg */
  2978. #endif
  2979.          )          /* predicate */,
  2980.     XPointer            /* arg */
  2981. #endif
  2982. );
  2983.  
  2984. extern int XImageByteOrder(
  2985. #if NeedFunctionPrototypes
  2986.     Display*            /* display */
  2987. #endif
  2988. );
  2989.  
  2990. extern XInstallColormap(
  2991. #if NeedFunctionPrototypes
  2992.     Display*            /* display */,
  2993.     Colormap            /* colormap */
  2994. #endif
  2995. );
  2996.  
  2997. extern KeyCode XKeysymToKeycode(
  2998. #if NeedFunctionPrototypes
  2999.     Display*            /* display */,
  3000.     KeySym              /* keysym */
  3001. #endif
  3002. );
  3003.  
  3004. extern XKillClient(
  3005. #if NeedFunctionPrototypes
  3006.     Display*            /* display */,
  3007.     XID                 /* resource */
  3008. #endif
  3009. );
  3010.  
  3011. extern unsigned long XLastKnownRequestProcessed(
  3012. #if NeedFunctionPrototypes
  3013.     Display*            /* display */
  3014. #endif
  3015. );
  3016.  
  3017. extern Status XLookupColor(
  3018. #if NeedFunctionPrototypes
  3019.     Display*            /* display */,
  3020.     Colormap            /* colormap */,
  3021.     _Xconst char*       /* color_name */,
  3022.     XColor*             /* exact_def_return */,
  3023.     XColor*             /* screen_def_return */
  3024. #endif
  3025. );
  3026.  
  3027. extern XLowerWindow(
  3028. #if NeedFunctionPrototypes
  3029.     Display*            /* display */,
  3030.     Window              /* w */
  3031. #endif
  3032. );
  3033.  
  3034. extern XMapRaised(
  3035. #if NeedFunctionPrototypes
  3036.     Display*            /* display */,
  3037.     Window              /* w */
  3038. #endif
  3039. );
  3040.  
  3041. extern XMapSubwindows(
  3042. #if NeedFunctionPrototypes
  3043.     Display*            /* display */,
  3044.     Window              /* w */
  3045. #endif
  3046. );
  3047.  
  3048. extern XMapWindow(
  3049. #if NeedFunctionPrototypes
  3050.     Display*            /* display */,
  3051.     Window              /* w */
  3052. #endif
  3053. );
  3054.  
  3055. extern XMaskEvent(
  3056. #if NeedFunctionPrototypes
  3057.     Display*            /* display */,
  3058.     long                /* event_mask */,
  3059.     XEvent*             /* event_return */
  3060. #endif
  3061. );
  3062.  
  3063. extern int XMaxCmapsOfScreen(
  3064. #if NeedFunctionPrototypes
  3065.     Screen*             /* screen */
  3066. #endif
  3067. );
  3068.  
  3069. extern int XMinCmapsOfScreen(
  3070. #if NeedFunctionPrototypes
  3071.     Screen*             /* screen */
  3072. #endif
  3073. );
  3074.  
  3075. extern XMoveResizeWindow(
  3076. #if NeedFunctionPrototypes
  3077.     Display*            /* display */,
  3078.     Window              /* w */,
  3079.     int                 /* x */,
  3080.     int                 /* y */,
  3081.     unsigned int        /* width */,
  3082.     unsigned int        /* height */
  3083. #endif
  3084. );
  3085.  
  3086. extern XMoveWindow(
  3087. #if NeedFunctionPrototypes
  3088.     Display*            /* display */,
  3089.     Window              /* w */,
  3090.     int                 /* x */,
  3091.     int                 /* y */
  3092. #endif
  3093. );
  3094.  
  3095. extern XNextEvent(
  3096. #if NeedFunctionPrototypes
  3097.     Display*            /* display */,
  3098.     XEvent*             /* event_return */
  3099. #endif
  3100. );
  3101.  
  3102. extern XNoOp(
  3103. #if NeedFunctionPrototypes
  3104.     Display*            /* display */
  3105. #endif
  3106. );
  3107.  
  3108. extern Status XParseColor(
  3109. #if NeedFunctionPrototypes
  3110.     Display*            /* display */,
  3111.     Colormap            /* colormap */,
  3112.     _Xconst char*       /* spec */,
  3113.     XColor*             /* exact_def_return */
  3114. #endif
  3115. );
  3116.  
  3117. extern int XParseGeometry(
  3118. #if NeedFunctionPrototypes
  3119.     _Xconst char*       /* parsestring */,
  3120.     int*                /* x_return */,
  3121.     int*                /* y_return */,
  3122.     unsigned int*       /* width_return */,
  3123.     unsigned int*       /* height_return */
  3124. #endif
  3125. );
  3126.  
  3127. extern XPeekEvent(
  3128. #if NeedFunctionPrototypes
  3129.     Display*            /* display */,
  3130.     XEvent*             /* event_return */
  3131. #endif
  3132. );
  3133.  
  3134. extern XPeekIfEvent(
  3135. #if NeedFunctionPrototypes
  3136.     Display*            /* display */,
  3137.     XEvent*             /* event_return */,
  3138.     Bool (*) (
  3139. #if NeedNestedPrototypes
  3140.            Display*         /* display */,
  3141.            XEvent*          /* event */,
  3142.            XPointer         /* arg */
  3143. #endif
  3144.          )          /* predicate */,
  3145.     XPointer            /* arg */
  3146. #endif
  3147. );
  3148.  
  3149. extern int XPending(
  3150. #if NeedFunctionPrototypes
  3151.     Display*            /* display */
  3152. #endif
  3153. );
  3154.  
  3155. extern int XPlanesOfScreen(
  3156. #if NeedFunctionPrototypes
  3157.     Screen*             /* screen */
  3158.     
  3159. #endif
  3160. );
  3161.  
  3162. extern int XProtocolRevision(
  3163. #if NeedFunctionPrototypes
  3164.     Display*            /* display */
  3165. #endif
  3166. );
  3167.  
  3168. extern int XProtocolVersion(
  3169. #if NeedFunctionPrototypes
  3170.     Display*            /* display */
  3171. #endif
  3172. );
  3173.  
  3174.  
  3175. extern XPutBackEvent(
  3176. #if NeedFunctionPrototypes
  3177.     Display*            /* display */,
  3178.     XEvent*             /* event */
  3179. #endif
  3180. );
  3181.  
  3182. extern XPutImage(
  3183. #if NeedFunctionPrototypes
  3184.     Display*            /* display */,
  3185.     Drawable            /* d */,
  3186.     GC                  /* gc */,
  3187.     XImage*             /* image */,
  3188.     int                 /* src_x */,
  3189.     int                 /* src_y */,
  3190.     int                 /* dest_x */,
  3191.     int                 /* dest_y */,
  3192.     unsigned int        /* width */,
  3193.     unsigned int        /* height */      
  3194. #endif
  3195. );
  3196.  
  3197. extern int XQLength(
  3198. #if NeedFunctionPrototypes
  3199.     Display*            /* display */
  3200. #endif
  3201. );
  3202.  
  3203. extern Status XQueryBestCursor(
  3204. #if NeedFunctionPrototypes
  3205.     Display*            /* display */,
  3206.     Drawable            /* d */,
  3207.     unsigned int        /* width */,
  3208.     unsigned int        /* height */,
  3209.     unsigned int*       /* width_return */,
  3210.     unsigned int*       /* height_return */
  3211. #endif
  3212. );
  3213.  
  3214. extern Status XQueryBestSize(
  3215. #if NeedFunctionPrototypes
  3216.     Display*            /* display */,
  3217.     int                 /* class */,
  3218.     Drawable            /* which_screen */,
  3219.     unsigned int        /* width */,
  3220.     unsigned int        /* height */,
  3221.     unsigned int*       /* width_return */,
  3222.     unsigned int*       /* height_return */
  3223. #endif
  3224. );
  3225.  
  3226. extern Status XQueryBestStipple(
  3227. #if NeedFunctionPrototypes
  3228.     Display*            /* display */,
  3229.     Drawable            /* which_screen */,
  3230.     unsigned int        /* width */,
  3231.     unsigned int        /* height */,
  3232.     unsigned int*       /* width_return */,
  3233.     unsigned int*       /* height_return */
  3234. #endif
  3235. );
  3236.  
  3237. extern Status XQueryBestTile(
  3238. #if NeedFunctionPrototypes
  3239.     Display*            /* display */,
  3240.     Drawable            /* which_screen */,
  3241.     unsigned int        /* width */,
  3242.     unsigned int        /* height */,
  3243.     unsigned int*       /* width_return */,
  3244.     unsigned int*       /* height_return */
  3245. #endif
  3246. );
  3247.  
  3248. extern XQueryColor(
  3249. #if NeedFunctionPrototypes
  3250.     Display*            /* display */,
  3251.     Colormap            /* colormap */,
  3252.     XColor*             /* def_in_out */
  3253. #endif
  3254. );
  3255.  
  3256. extern XQueryColors(
  3257. #if NeedFunctionPrototypes
  3258.     Display*            /* display */,
  3259.     Colormap            /* colormap */,
  3260.     XColor*             /* defs_in_out */,
  3261.     int                 /* ncolors */
  3262. #endif
  3263. );
  3264.  
  3265. extern Bool XQueryExtension(
  3266. #if NeedFunctionPrototypes
  3267.     Display*            /* display */,
  3268.     _Xconst char*       /* name */,
  3269.     int*                /* major_opcode_return */,
  3270.     int*                /* first_event_return */,
  3271.     int*                /* first_error_return */
  3272. #endif
  3273. );
  3274.  
  3275. extern XQueryKeymap(
  3276. #if NeedFunctionPrototypes
  3277.     Display*            /* display */,
  3278.     char [32]           /* keys_return */
  3279. #endif
  3280. );
  3281.  
  3282. extern Bool XQueryPointer(
  3283. #if NeedFunctionPrototypes
  3284.     Display*            /* display */,
  3285.     Window              /* w */,
  3286.     Window*             /* root_return */,
  3287.     Window*             /* child_return */,
  3288.     int*                /* root_x_return */,
  3289.     int*                /* root_y_return */,
  3290.     int*                /* win_x_return */,
  3291.     int*                /* win_y_return */,
  3292.     unsigned int*       /* mask_return */
  3293. #endif
  3294. );
  3295.  
  3296. extern XQueryTextExtents(
  3297. #if NeedFunctionPrototypes
  3298.     Display*            /* display */,
  3299.     XID                 /* font_ID */,
  3300.     _Xconst char*       /* string */,
  3301.     int                 /* nchars */,
  3302.     int*                /* direction_return */,
  3303.     int*                /* font_ascent_return */,
  3304.     int*                /* font_descent_return */,
  3305.     XCharStruct*        /* overall_return */    
  3306. #endif
  3307. );
  3308.  
  3309. extern XQueryTextExtents16(
  3310. #if NeedFunctionPrototypes
  3311.     Display*            /* display */,
  3312.     XID                 /* font_ID */,
  3313.     _Xconst XChar2b*    /* string */,
  3314.     int                 /* nchars */,
  3315.     int*                /* direction_return */,
  3316.     int*                /* font_ascent_return */,
  3317.     int*                /* font_descent_return */,
  3318.     XCharStruct*        /* overall_return */
  3319. #endif
  3320. );
  3321.  
  3322. extern Status XQueryTree(
  3323. #if NeedFunctionPrototypes
  3324.     Display*            /* display */,
  3325.     Window              /* w */,
  3326.     Window*             /* root_return */,
  3327.     Window*             /* parent_return */,
  3328.     Window**            /* children_return */,
  3329.     unsigned int*       /* nchildren_return */
  3330. #endif
  3331. );
  3332.  
  3333. extern XRaiseWindow(
  3334. #if NeedFunctionPrototypes
  3335.     Display*            /* display */,
  3336.     Window              /* w */
  3337. #endif
  3338. );
  3339.  
  3340. extern int XReadBitmapFile(
  3341. #if NeedFunctionPrototypes
  3342.     Display*            /* display */,
  3343.     Drawable            /* d */,
  3344.     _Xconst char*       /* filename */,
  3345.     unsigned int*       /* width_return */,
  3346.     unsigned int*       /* height_return */,
  3347.     Pixmap*             /* bitmap_return */,
  3348.     int*                /* x_hot_return */,
  3349.     int*                /* y_hot_return */
  3350. #endif
  3351. );
  3352.  
  3353. extern XRebindKeysym(
  3354. #if NeedFunctionPrototypes
  3355.     Display*            /* display */,
  3356.     KeySym              /* keysym */,
  3357.     KeySym*             /* list */,
  3358.     int                 /* mod_count */,
  3359.     _Xconst unsigned char*      /* string */,
  3360.     int                 /* bytes_string */
  3361. #endif
  3362. );
  3363.  
  3364. extern XRecolorCursor(
  3365. #if NeedFunctionPrototypes
  3366.     Display*            /* display */,
  3367.     Cursor              /* cursor */,
  3368.     XColor*             /* foreground_color */,
  3369.     XColor*             /* background_color */
  3370. #endif
  3371. );
  3372.  
  3373. extern XRefreshKeyboardMapping(
  3374. #if NeedFunctionPrototypes
  3375.     XMappingEvent*      /* event_map */    
  3376. #endif
  3377. );
  3378.  
  3379. extern XRemoveFromSaveSet(
  3380. #if NeedFunctionPrototypes
  3381.     Display*            /* display */,
  3382.     Window              /* w */
  3383. #endif
  3384. );
  3385.  
  3386. extern XRemoveHost(
  3387. #if NeedFunctionPrototypes
  3388.     Display*            /* display */,
  3389.     XHostAddress*       /* host */
  3390. #endif
  3391. );
  3392.  
  3393. extern XRemoveHosts(
  3394. #if NeedFunctionPrototypes
  3395.     Display*            /* display */,
  3396.     XHostAddress*       /* hosts */,
  3397.     int                 /* num_hosts */
  3398. #endif
  3399. );
  3400.  
  3401. extern XReparentWindow(
  3402. #if NeedFunctionPrototypes
  3403.     Display*            /* display */,
  3404.     Window              /* w */,
  3405.     Window              /* parent */,
  3406.     int                 /* x */,
  3407.     int                 /* y */
  3408. #endif
  3409. );
  3410.  
  3411. extern XResetScreenSaver(
  3412. #if NeedFunctionPrototypes
  3413.     Display*            /* display */
  3414. #endif
  3415. );
  3416.  
  3417. extern XResizeWindow(
  3418. #if NeedFunctionPrototypes
  3419.     Display*            /* display */,
  3420.     Window              /* w */,
  3421.     unsigned int        /* width */,
  3422.     unsigned int        /* height */
  3423. #endif
  3424. );
  3425.  
  3426. extern XRestackWindows(
  3427. #if NeedFunctionPrototypes
  3428.     Display*            /* display */,
  3429.     Window*             /* windows */,
  3430.     int                 /* nwindows */
  3431. #endif
  3432. );
  3433.  
  3434. extern XRotateBuffers(
  3435. #if NeedFunctionPrototypes
  3436.     Display*            /* display */,
  3437.     int                 /* rotate */
  3438. #endif
  3439. );
  3440.  
  3441. extern XRotateWindowProperties(
  3442. #if NeedFunctionPrototypes
  3443.     Display*            /* display */,
  3444.     Window              /* w */,
  3445.     Atom*               /* properties */,
  3446.     int                 /* num_prop */,
  3447.     int                 /* npositions */
  3448. #endif
  3449. );
  3450.  
  3451. extern int XScreenCount(
  3452. #if NeedFunctionPrototypes
  3453.     Display*            /* display */
  3454. #endif
  3455. );
  3456.  
  3457. extern XSelectInput(
  3458. #if NeedFunctionPrototypes
  3459.     Display*            /* display */,
  3460.     Window              /* w */,
  3461.     long                /* event_mask */
  3462. #endif
  3463. );
  3464.  
  3465. extern Status XSendEvent(
  3466. #if NeedFunctionPrototypes
  3467.     Display*            /* display */,
  3468.     Window              /* w */,
  3469.     Bool                /* propagate */,
  3470.     long                /* event_mask */,
  3471.     XEvent*             /* event_send */
  3472. #endif
  3473. );
  3474.  
  3475. extern XSetAccessControl(
  3476. #if NeedFunctionPrototypes
  3477.     Display*            /* display */,
  3478.     int                 /* mode */
  3479. #endif
  3480. );
  3481.  
  3482. extern XSetArcMode(
  3483. #if NeedFunctionPrototypes
  3484.     Display*            /* display */,
  3485.     GC                  /* gc */,
  3486.     int                 /* arc_mode */
  3487. #endif
  3488. );
  3489.  
  3490. extern XSetBackground(
  3491. #if NeedFunctionPrototypes
  3492.     Display*            /* display */,
  3493.     GC                  /* gc */,
  3494.     unsigned long       /* background */
  3495. #endif
  3496. );
  3497.  
  3498. extern XSetClipMask(
  3499. #if NeedFunctionPrototypes
  3500.     Display*            /* display */,
  3501.     GC                  /* gc */,
  3502.     Pixmap              /* pixmap */
  3503. #endif
  3504. );
  3505.  
  3506. extern XSetClipOrigin(
  3507. #if NeedFunctionPrototypes
  3508.     Display*            /* display */,
  3509.     GC                  /* gc */,
  3510.     int                 /* clip_x_origin */,
  3511.     int                 /* clip_y_origin */
  3512. #endif
  3513. );
  3514.  
  3515. extern XSetClipRectangles(
  3516. #if NeedFunctionPrototypes
  3517.     Display*            /* display */,
  3518.     GC                  /* gc */,
  3519.     int                 /* clip_x_origin */,
  3520.     int                 /* clip_y_origin */,
  3521.     XRectangle*         /* rectangles */,
  3522.     int                 /* n */,
  3523.     int                 /* ordering */
  3524. #endif
  3525. );
  3526.  
  3527. extern XSetCloseDownMode(
  3528. #if NeedFunctionPrototypes
  3529.     Display*            /* display */,
  3530.     int                 /* close_mode */
  3531. #endif
  3532. );
  3533.  
  3534. extern XSetCommand(
  3535. #if NeedFunctionPrototypes
  3536.     Display*            /* display */,
  3537.     Window              /* w */,
  3538.     char**              /* argv */,
  3539.     int                 /* argc */
  3540. #endif
  3541. );
  3542.  
  3543. extern XSetDashes(
  3544. #if NeedFunctionPrototypes
  3545.     Display*            /* display */,
  3546.     GC                  /* gc */,
  3547.     int                 /* dash_offset */,
  3548.     _Xconst char*       /* dash_list */,
  3549.     int                 /* n */
  3550. #endif
  3551. );
  3552.  
  3553. extern XSetFillRule(
  3554. #if NeedFunctionPrototypes
  3555.     Display*            /* display */,
  3556.     GC                  /* gc */,
  3557.     int                 /* fill_rule */
  3558. #endif
  3559. );
  3560.  
  3561. extern XSetFillStyle(
  3562. #if NeedFunctionPrototypes
  3563.     Display*            /* display */,
  3564.     GC                  /* gc */,
  3565.     int                 /* fill_style */
  3566. #endif
  3567. );
  3568.  
  3569. extern XSetFont(
  3570. #if NeedFunctionPrototypes
  3571.     Display*            /* display */,
  3572.     GC                  /* gc */,
  3573.     Font                /* font */
  3574. #endif
  3575. );
  3576.  
  3577. extern XSetFontPath(
  3578. #if NeedFunctionPrototypes
  3579.     Display*            /* display */,
  3580.     char**              /* directories */,
  3581.     int                 /* ndirs */          
  3582. #endif
  3583. );
  3584.  
  3585. extern XSetForeground(
  3586. #if NeedFunctionPrototypes
  3587.     Display*            /* display */,
  3588.     GC                  /* gc */,
  3589.     unsigned long       /* foreground */
  3590. #endif
  3591. );
  3592.  
  3593. extern XSetFunction(
  3594. #if NeedFunctionPrototypes
  3595.     Display*            /* display */,
  3596.     GC                  /* gc */,
  3597.     int                 /* function */
  3598. #endif
  3599. );
  3600.  
  3601. extern XSetGraphicsExposures(
  3602. #if NeedFunctionPrototypes
  3603.     Display*            /* display */,
  3604.     GC                  /* gc */,
  3605.     Bool                /* graphics_exposures */
  3606. #endif
  3607. );
  3608.  
  3609. extern XSetIconName(
  3610. #if NeedFunctionPrototypes
  3611.     Display*            /* display */,
  3612.     Window              /* w */,
  3613.     _Xconst char*       /* icon_name */
  3614. #endif
  3615. );
  3616.  
  3617. extern XSetInputFocus(
  3618. #if NeedFunctionPrototypes
  3619.     Display*            /* display */,
  3620.     Window              /* focus */,
  3621.     int                 /* revert_to */,
  3622.     Time                /* time */
  3623. #endif
  3624. );
  3625.  
  3626. extern XSetLineAttributes(
  3627. #if NeedFunctionPrototypes
  3628.     Display*            /* display */,
  3629.     GC                  /* gc */,
  3630.     unsigned int        /* line_width */,
  3631.     int                 /* line_style */,
  3632.     int                 /* cap_style */,
  3633.     int                 /* join_style */
  3634. #endif
  3635. );
  3636.  
  3637. extern int XSetModifierMapping(
  3638. #if NeedFunctionPrototypes
  3639.     Display*            /* display */,
  3640.     XModifierKeymap*    /* modmap */
  3641. #endif
  3642. );
  3643.  
  3644. extern XSetPlaneMask(
  3645. #if NeedFunctionPrototypes
  3646.     Display*            /* display */,
  3647.     GC                  /* gc */,
  3648.     unsigned long       /* plane_mask */
  3649. #endif
  3650. );
  3651.  
  3652. extern int XSetPointerMapping(
  3653. #if NeedFunctionPrototypes
  3654.     Display*            /* display */,
  3655.     _Xconst unsigned char*      /* map */,
  3656.     int                 /* nmap */
  3657. #endif
  3658. );
  3659.  
  3660. extern XSetScreenSaver(
  3661. #if NeedFunctionPrototypes
  3662.     Display*            /* display */,
  3663.     int                 /* timeout */,
  3664.     int                 /* interval */,
  3665.     int                 /* prefer_blanking */,
  3666.     int                 /* allow_exposures */
  3667. #endif
  3668. );
  3669.  
  3670. extern XSetSelectionOwner(
  3671. #if NeedFunctionPrototypes
  3672.     Display*            /* display */,
  3673.     Atom                /* selection */,
  3674.     Window              /* owner */,
  3675.     Time                /* time */
  3676. #endif
  3677. );
  3678.  
  3679. extern XSetState(
  3680. #if NeedFunctionPrototypes
  3681.     Display*            /* display */,
  3682.     GC                  /* gc */,
  3683.     unsigned long       /* foreground */,
  3684.     unsigned long       /* background */,
  3685.     int                 /* function */,
  3686.     unsigned long       /* plane_mask */
  3687. #endif
  3688. );
  3689.  
  3690. extern XSetStipple(
  3691. #if NeedFunctionPrototypes
  3692.     Display*            /* display */,
  3693.     GC                  /* gc */,
  3694.     Pixmap              /* stipple */
  3695. #endif
  3696. );
  3697.  
  3698. extern XSetSubwindowMode(
  3699. #if NeedFunctionPrototypes
  3700.     Display*            /* display */,
  3701.     GC                  /* gc */,
  3702.     int                 /* subwindow_mode */
  3703. #endif
  3704. );
  3705.  
  3706. extern XSetTSOrigin(
  3707. #if NeedFunctionPrototypes
  3708.     Display*            /* display */,
  3709.     GC                  /* gc */,
  3710.     int                 /* ts_x_origin */,
  3711.     int                 /* ts_y_origin */
  3712. #endif
  3713. );
  3714.  
  3715. extern XSetTile(
  3716. #if NeedFunctionPrototypes
  3717.     Display*            /* display */,
  3718.     GC                  /* gc */,
  3719.     Pixmap              /* tile */
  3720. #endif
  3721. );
  3722.  
  3723. extern XSetWindowBackground(
  3724. #if NeedFunctionPrototypes
  3725.     Display*            /* display */,
  3726.     Window              /* w */,
  3727.     unsigned long       /* background_pixel */
  3728. #endif
  3729. );
  3730.  
  3731. extern XSetWindowBackgroundPixmap(
  3732. #if NeedFunctionPrototypes
  3733.     Display*            /* display */,
  3734.     Window              /* w */,
  3735.     Pixmap              /* background_pixmap */
  3736. #endif
  3737. );
  3738.  
  3739. extern XSetWindowBorder(
  3740. #if NeedFunctionPrototypes
  3741.     Display*            /* display */,
  3742.     Window              /* w */,
  3743.     unsigned long       /* border_pixel */
  3744. #endif
  3745. );
  3746.  
  3747. extern XSetWindowBorderPixmap(
  3748. #if NeedFunctionPrototypes
  3749.     Display*            /* display */,
  3750.     Window              /* w */,
  3751.     Pixmap              /* border_pixmap */
  3752. #endif
  3753. );
  3754.  
  3755. extern XSetWindowBorderWidth(
  3756. #if NeedFunctionPrototypes
  3757.     Display*            /* display */,
  3758.     Window              /* w */,
  3759.     unsigned int        /* width */
  3760. #endif
  3761. );
  3762.  
  3763. extern XSetWindowColormap(
  3764. #if NeedFunctionPrototypes
  3765.     Display*            /* display */,
  3766.     Window              /* w */,
  3767.     Colormap            /* colormap */
  3768. #endif
  3769. );
  3770.  
  3771. extern XStoreBuffer(
  3772. #if NeedFunctionPrototypes
  3773.     Display*            /* display */,
  3774.     _Xconst char*       /* bytes */,
  3775.     int                 /* nbytes */,
  3776.     int                 /* buffer */
  3777. #endif
  3778. );
  3779.  
  3780. extern XStoreBytes(
  3781. #if NeedFunctionPrototypes
  3782.     Display*            /* display */,
  3783.     _Xconst char*       /* bytes */,
  3784.     int                 /* nbytes */
  3785. #endif
  3786. );
  3787.  
  3788. extern XStoreColor(
  3789. #if NeedFunctionPrototypes
  3790.     Display*            /* display */,
  3791.     Colormap            /* colormap */,
  3792.     XColor*             /* color */
  3793. #endif
  3794. );
  3795.  
  3796. extern XStoreColors(
  3797. #if NeedFunctionPrototypes
  3798.     Display*            /* display */,
  3799.     Colormap            /* colormap */,
  3800.     XColor*             /* color */,
  3801.     int                 /* ncolors */
  3802. #endif
  3803. );
  3804.  
  3805. extern XStoreName(
  3806. #if NeedFunctionPrototypes
  3807.     Display*            /* display */,
  3808.     Window              /* w */,
  3809.     _Xconst char*       /* window_name */
  3810. #endif
  3811. );
  3812.  
  3813. extern XStoreNamedColor(
  3814. #if NeedFunctionPrototypes
  3815.     Display*            /* display */,
  3816.     Colormap            /* colormap */,
  3817.     _Xconst char*       /* color */,
  3818.     unsigned long       /* pixel */,
  3819.     int                 /* flags */
  3820. #endif
  3821. );
  3822.  
  3823. extern XSync(
  3824. #if NeedFunctionPrototypes
  3825.     Display*            /* display */,
  3826.     Bool                /* discard */
  3827. #endif
  3828. );
  3829.  
  3830. extern XTextExtents(
  3831. #if NeedFunctionPrototypes
  3832.     XFontStruct*        /* font_struct */,
  3833.     _Xconst char*       /* string */,
  3834.     int                 /* nchars */,
  3835.     int*                /* direction_return */,
  3836.     int*                /* font_ascent_return */,
  3837.     int*                /* font_descent_return */,
  3838.     XCharStruct*        /* overall_return */
  3839. #endif
  3840. );
  3841.  
  3842. extern XTextExtents16(
  3843. #if NeedFunctionPrototypes
  3844.     XFontStruct*        /* font_struct */,
  3845.     _Xconst XChar2b*    /* string */,
  3846.     int                 /* nchars */,
  3847.     int*                /* direction_return */,
  3848.     int*                /* font_ascent_return */,
  3849.     int*                /* font_descent_return */,
  3850.     XCharStruct*        /* overall_return */
  3851. #endif
  3852. );
  3853.  
  3854. extern int XTextWidth(
  3855. #if NeedFunctionPrototypes
  3856.     XFontStruct*        /* font_struct */,
  3857.     _Xconst char*       /* string */,
  3858.     int                 /* count */
  3859. #endif
  3860. );
  3861.  
  3862. extern int XTextWidth16(
  3863. #if NeedFunctionPrototypes
  3864.     XFontStruct*        /* font_struct */,
  3865.     _Xconst XChar2b*    /* string */,
  3866.     int                 /* count */
  3867. #endif
  3868. );
  3869.  
  3870. extern Bool XTranslateCoordinates(
  3871. #if NeedFunctionPrototypes
  3872.     Display*            /* display */,
  3873.     Window              /* src_w */,
  3874.     Window              /* dest_w */,
  3875.     int                 /* src_x */,
  3876.     int                 /* src_y */,
  3877.     int*                /* dest_x_return */,
  3878.     int*                /* dest_y_return */,
  3879.     Window*             /* child_return */
  3880. #endif
  3881. );
  3882.  
  3883. extern XUndefineCursor(
  3884. #if NeedFunctionPrototypes
  3885.     Display*            /* display */,
  3886.     Window              /* w */
  3887. #endif
  3888. );
  3889.  
  3890. extern XUngrabButton(
  3891. #if NeedFunctionPrototypes
  3892.     Display*            /* display */,
  3893.     unsigned int        /* button */,
  3894.     unsigned int        /* modifiers */,
  3895.     Window              /* grab_window */
  3896. #endif
  3897. );
  3898.  
  3899. extern XUngrabKey(
  3900. #if NeedFunctionPrototypes
  3901.     Display*            /* display */,
  3902.     int                 /* keycode */,
  3903.     unsigned int        /* modifiers */,
  3904.     Window              /* grab_window */
  3905. #endif
  3906. );
  3907.  
  3908. extern XUngrabKeyboard(
  3909. #if NeedFunctionPrototypes
  3910.     Display*            /* display */,
  3911.     Time                /* time */
  3912. #endif
  3913. );
  3914.  
  3915. extern XUngrabPointer(
  3916. #if NeedFunctionPrototypes
  3917.     Display*            /* display */,
  3918.     Time                /* time */
  3919. #endif
  3920. );
  3921.  
  3922. extern XUngrabServer(
  3923. #if NeedFunctionPrototypes
  3924.     Display*            /* display */
  3925. #endif
  3926. );
  3927.  
  3928. extern XUninstallColormap(
  3929. #if NeedFunctionPrototypes
  3930.     Display*            /* display */,
  3931.     Colormap            /* colormap */
  3932. #endif
  3933. );
  3934.  
  3935. extern XUnloadFont(
  3936. #if NeedFunctionPrototypes
  3937.     Display*            /* display */,
  3938.     Font                /* font */
  3939. #endif
  3940. );
  3941.  
  3942. extern XUnmapSubwindows(
  3943. #if NeedFunctionPrototypes
  3944.     Display*            /* display */,
  3945.     Window              /* w */
  3946. #endif
  3947. );
  3948.  
  3949. extern XUnmapWindow(
  3950. #if NeedFunctionPrototypes
  3951.     Display*            /* display */,
  3952.     Window              /* w */
  3953. #endif
  3954. );
  3955.  
  3956. extern int XVendorRelease(
  3957. #if NeedFunctionPrototypes
  3958.     Display*            /* display */
  3959. #endif
  3960. );
  3961.  
  3962. extern XWarpPointer(
  3963. #if NeedFunctionPrototypes
  3964.     Display*            /* display */,
  3965.     Window              /* src_w */,
  3966.     Window              /* dest_w */,
  3967.     int                 /* src_x */,
  3968.     int                 /* src_y */,
  3969.     unsigned int        /* src_width */,
  3970.     unsigned int        /* src_height */,
  3971.     int                 /* dest_x */,
  3972.     int                 /* dest_y */         
  3973. #endif
  3974. );
  3975.  
  3976. extern int XWidthMMOfScreen(
  3977. #if NeedFunctionPrototypes
  3978.     Screen*             /* screen */
  3979. #endif
  3980. );
  3981.  
  3982. extern int XWidthOfScreen(
  3983. #if NeedFunctionPrototypes
  3984.     Screen*             /* screen */
  3985. #endif
  3986. );
  3987.  
  3988. extern XWindowEvent(
  3989. #if NeedFunctionPrototypes
  3990.     Display*            /* display */,
  3991.     Window              /* w */,
  3992.     long                /* event_mask */,
  3993.     XEvent*             /* event_return */
  3994. #endif
  3995. );
  3996.  
  3997. extern int XWriteBitmapFile(
  3998. #if NeedFunctionPrototypes
  3999.     Display*            /* display */,
  4000.     _Xconst char*       /* filename */,
  4001.     Pixmap              /* bitmap */,
  4002.     unsigned int        /* width */,
  4003.     unsigned int        /* height */,
  4004.     int                 /* x_hot */,
  4005.     int                 /* y_hot */                  
  4006. #endif
  4007. );
  4008.  
  4009. extern Bool XSupportsLocale(
  4010. #if NeedFunctionPrototypes
  4011.     void
  4012. #endif
  4013. );
  4014.  
  4015. extern char *XSetLocaleModifiers(
  4016. #if NeedFunctionPrototypes
  4017.     _Xconst char*       /* modifier_list */
  4018. #endif
  4019. );
  4020.  
  4021. extern XFontSet XCreateFontSet(
  4022. #if NeedFunctionPrototypes
  4023.     Display*            /* display */,
  4024.     _Xconst char*       /* base_font_name_list */,
  4025.     char***             /* missing_charset_list */,
  4026.     int*                /* missing_charset_count */,
  4027.     char**              /* def_string */
  4028. #endif
  4029. );
  4030.  
  4031. extern void XFreeFontSet(
  4032. #if NeedFunctionPrototypes
  4033.     Display*            /* display */,
  4034.     XFontSet            /* font_set */
  4035. #endif
  4036. );
  4037.  
  4038. extern int XFontsOfFontSet(
  4039. #if NeedFunctionPrototypes
  4040.     XFontSet            /* font_set */,
  4041.     XFontStruct***      /* font_struct_list */,
  4042.     char***             /* font_name_list */
  4043. #endif
  4044. );
  4045.  
  4046. extern char *XBaseFontNameListOfFontSet(
  4047. #if NeedFunctionPrototypes
  4048.     XFontSet            /* font_set */
  4049. #endif
  4050. );
  4051.  
  4052. extern char *XLocaleOfFontSet(
  4053. #if NeedFunctionPrototypes
  4054.     XFontSet            /* font_set */
  4055. #endif
  4056. );
  4057.  
  4058. extern Bool XContextDependentDrawing(
  4059. #if NeedFunctionPrototypes
  4060.     XFontSet            /* font_set */
  4061. #endif
  4062. );
  4063.  
  4064. extern XFontSetExtents *XExtentsOfFontSet(
  4065. #if NeedFunctionPrototypes
  4066.     XFontSet            /* font_set */
  4067. #endif
  4068. );
  4069.  
  4070. extern int XmbTextEscapement(
  4071. #if NeedFunctionPrototypes
  4072.     XFontSet            /* font_set */,
  4073.     _Xconst char*       /* text */,
  4074.     int                 /* bytes_text */
  4075. #endif
  4076. );
  4077.  
  4078. extern int XwcTextEscapement(
  4079. #if NeedFunctionPrototypes
  4080.     XFontSet            /* font_set */,
  4081.     wchar_t*            /* text */,
  4082.     int                 /* num_wchars */
  4083. #endif
  4084. );
  4085.  
  4086. extern int XmbTextExtents(
  4087. #if NeedFunctionPrototypes
  4088.     XFontSet            /* font_set */,
  4089.     _Xconst char*       /* text */,
  4090.     int                 /* bytes_text */,
  4091.     XRectangle*         /* overall_ink_return */,
  4092.     XRectangle*         /* overall_logical_return */
  4093. #endif
  4094. );
  4095.  
  4096. extern int XwcTextExtents(
  4097. #if NeedFunctionPrototypes
  4098.     XFontSet            /* font_set */,
  4099.     wchar_t*            /* text */,
  4100.     int                 /* num_wchars */,
  4101.     XRectangle*         /* overall_ink_return */,
  4102.     XRectangle*         /* overall_logical_return */
  4103. #endif
  4104. );
  4105.  
  4106. extern Status XmbTextPerCharExtents(
  4107. #if NeedFunctionPrototypes
  4108.     XFontSet            /* font_set */,
  4109.     _Xconst char*       /* text */,
  4110.     int                 /* bytes_text */,
  4111.     XRectangle*         /* ink_extents_buffer */,
  4112.     XRectangle*         /* logical_extents_buffer */,
  4113.     int                 /* buffer_size */,
  4114.     int*                /* num_chars */,
  4115.     XRectangle*         /* overall_ink_return */,
  4116.     XRectangle*         /* overall_logical_return */
  4117. #endif
  4118. );
  4119.  
  4120. extern Status XwcTextPerCharExtents(
  4121. #if NeedFunctionPrototypes
  4122.     XFontSet            /* font_set */,
  4123.     wchar_t*            /* text */,
  4124.     int                 /* num_wchars */,
  4125.     XRectangle*         /* ink_extents_buffer */,
  4126.     XRectangle*         /* logical_extents_buffer */,
  4127.     int                 /* buffer_size */,
  4128.     int*                /* num_chars */,
  4129.     XRectangle*         /* overall_ink_return */,
  4130.     XRectangle*         /* overall_logical_return */
  4131. #endif
  4132. );
  4133.  
  4134. extern void XmbDrawText(
  4135. #if NeedFunctionPrototypes
  4136.     Display*            /* display */,
  4137.     Drawable            /* d */,
  4138.     GC                  /* gc */,
  4139.     int                 /* x */,
  4140.     int                 /* y */,
  4141.     XmbTextItem*        /* text_items */,
  4142.     int                 /* nitems */
  4143. #endif
  4144. );
  4145.  
  4146. extern void XwcDrawText(
  4147. #if NeedFunctionPrototypes
  4148.     Display*            /* display */,
  4149.     Drawable            /* d */,
  4150.     GC                  /* gc */,
  4151.     int                 /* x */,
  4152.     int                 /* y */,
  4153.     XwcTextItem*        /* text_items */,
  4154.     int                 /* nitems */
  4155. #endif
  4156. );
  4157.  
  4158. extern void XmbDrawString(
  4159. #if NeedFunctionPrototypes
  4160.     Display*            /* display */,
  4161.     Drawable            /* d */,
  4162.     XFontSet            /* font_set */,
  4163.     GC                  /* gc */,
  4164.     int                 /* x */,
  4165.     int                 /* y */,
  4166.     _Xconst char*       /* text */,
  4167.     int                 /* bytes_text */
  4168. #endif
  4169. );
  4170.  
  4171. extern void XwcDrawString(
  4172. #if NeedFunctionPrototypes
  4173.     Display*            /* display */,
  4174.     Drawable            /* d */,
  4175.     XFontSet            /* font_set */,
  4176.     GC                  /* gc */,
  4177.     int                 /* x */,
  4178.     int                 /* y */,
  4179.     wchar_t*            /* text */,
  4180.     int                 /* num_wchars */
  4181. #endif
  4182. );
  4183.  
  4184. extern void XmbDrawImageString(
  4185. #if NeedFunctionPrototypes
  4186.     Display*            /* display */,
  4187.     Drawable            /* d */,
  4188.     XFontSet            /* font_set */,
  4189.     GC                  /* gc */,
  4190.     int                 /* x */,
  4191.     int                 /* y */,
  4192.     _Xconst char*       /* text */,
  4193.     int                 /* bytes_text */
  4194. #endif
  4195. );
  4196.  
  4197. extern void XwcDrawImageString(
  4198. #if NeedFunctionPrototypes
  4199.     Display*            /* display */,
  4200.     Drawable            /* d */,
  4201.     XFontSet            /* font_set */,
  4202.     GC                  /* gc */,
  4203.     int                 /* x */,
  4204.     int                 /* y */,
  4205.     wchar_t*            /* text */,
  4206.     int                 /* num_wchars */
  4207. #endif
  4208. );
  4209.  
  4210. extern XIM XOpenIM(
  4211. #if NeedFunctionPrototypes
  4212.     Display*                    /* dpy */,
  4213.     struct _XrmHashBucketRec*   /* rdb */,
  4214.     char*                       /* res_name */,
  4215.     char*                       /* res_class */
  4216. #endif
  4217. );
  4218.  
  4219. extern Status XCloseIM(
  4220. #if NeedFunctionPrototypes
  4221.     XIM /* im */
  4222. #endif
  4223. );
  4224.  
  4225. extern char *XGetIMValues(
  4226. #if NeedVarargsPrototypes
  4227.     XIM /* im */, ...
  4228. #endif
  4229. );
  4230.  
  4231. extern Display *XDisplayOfIM(
  4232. #if NeedFunctionPrototypes
  4233.     XIM /* im */
  4234. #endif
  4235. );
  4236.  
  4237. extern char *XLocaleOfIM(
  4238. #if NeedFunctionPrototypes
  4239.     XIM /* im*/
  4240. #endif
  4241. );
  4242.  
  4243. extern XIC XCreateIC(
  4244. #if NeedVarargsPrototypes
  4245.     XIM /* im */, ...
  4246. #endif
  4247. );
  4248.  
  4249. extern void XDestroyIC(
  4250. #if NeedFunctionPrototypes
  4251.     XIC /* ic */
  4252. #endif
  4253. );
  4254.  
  4255. extern void XSetICFocus(
  4256. #if NeedFunctionPrototypes
  4257.     XIC /* ic */
  4258. #endif
  4259. );
  4260.  
  4261. extern void XUnsetICFocus(
  4262. #if NeedFunctionPrototypes
  4263.     XIC /* ic */
  4264. #endif
  4265. );
  4266.  
  4267. extern wchar_t *XwcResetIC(
  4268. #if NeedFunctionPrototypes
  4269.     XIC /* ic */
  4270. #endif
  4271. );
  4272.  
  4273. extern char *XmbResetIC(
  4274. #if NeedFunctionPrototypes
  4275.     XIC /* ic */
  4276. #endif
  4277. );
  4278.  
  4279. extern char *XSetICValues(
  4280. #if NeedVarargsPrototypes
  4281.     XIC /* ic */, ...
  4282. #endif
  4283. );
  4284.  
  4285. extern char *XGetICValues(
  4286. #if NeedVarargsPrototypes
  4287.     XIC /* ic */, ...
  4288. #endif
  4289. );
  4290.  
  4291. extern XIM XIMOfIC(
  4292. #if NeedFunctionPrototypes
  4293.     XIC /* ic */
  4294. #endif
  4295. );
  4296.  
  4297. extern Bool XFilterEvent(
  4298. #if NeedFunctionPrototypes
  4299.     XEvent*     /* event */,
  4300.     Window      /* window */
  4301. #endif
  4302. );
  4303.  
  4304. extern int XmbLookupString(
  4305. #if NeedFunctionPrototypes
  4306.     XIC                 /* ic */,
  4307.     XKeyPressedEvent*   /* event */,
  4308.     char*               /* buffer_return */,
  4309.     int                 /* bytes_buffer */,
  4310.     KeySym*             /* keysym_return */,
  4311.     Status*             /* status_return */
  4312. #endif
  4313. );
  4314.  
  4315. extern int XwcLookupString(
  4316. #if NeedFunctionPrototypes
  4317.     XIC                 /* ic */,
  4318.     XKeyPressedEvent*   /* event */,
  4319.     wchar_t*            /* buffer_return */,
  4320.     int                 /* wchars_buffer */,
  4321.     KeySym*             /* keysym_return */,
  4322.     Status*             /* status_return */
  4323. #endif
  4324. );
  4325.  
  4326. extern XVaNestedList XVaCreateNestedList(
  4327. #if NeedVarargsPrototypes
  4328.     int /*unused*/, ...
  4329. #endif
  4330. );
  4331.  
  4332. _XFUNCPROTOEND
  4333.  
  4334. #endif /* _XLIB_H_ */
  4335.